Continued to restructure directory

This commit is contained in:
Nico Schottelius 2005-12-14 10:08:47 +01:00
commit b736ba0bac
2 changed files with 0 additions and 0 deletions

122
doc/configuration Normal file
View file

@ -0,0 +1,122 @@
--------------------------------------------------------------------------------
ccollect.sh, Nico Schottelius, 2005-12-07
--------------------------------------------------------------------------------
0. Runtime options
1. General configuration
2. Source configuration
--------------------------------------------------------------------------------
0. Runtime options
ccollect looks for its configuration in /etc/ccollect or, if set, in
the directory specified by $CCOLLECT_CONF
(use CCOLLECT_CONF=/your/config/dir ccollect.sh on the shell).
When you start ccollect, you have either to specify which intervall
to backup (daily, weekly, yearly; you can specify the names yourself, see below).
The intervall is used to specify how many backups to keep.
There are also some self explaining parameters you can pass to ccollect, simply use
"ccollect.sh --help" for info.
--------------------------------------------------------------------------------
1. General configuration
The general configuration can be found below $CCOLLECT_CONF/defaults or
/etc/ccollect/defaults. All options specified here are valid for
all source definitions, if the values are not overwritten in the source
configuration.
All configuration entries are plain-text files.
1.2. Intervall definition
The intervall definition can be found below $CCOLLECT_CONF/defaults/intervalls/ or
/etc/ccollect/defaults/intervalls.
Every file below this directory specifies an intervall. The name of the file is the
name of the intervall:
intervalls/<intervall name>
The content of this file should be a single line containing a number.
This number defines how many versions of this intervall to keep.
STOPPED HERE.
--------------------------------------------------------------------------------
2. Source configuration
Each source configuration exists below $CCOLLECT_CONF/sources/$name.
The name describes the source.
Each source has at least
- source (a text file containing the path to backup)
- destination (a link to the directory we should backup to)
Additionally a source may have the following files:
- verbose whether to be verbose
- exclude excludes for rsync. One exclude specification on each line
--------------------------------------------------------------------------------
$CCOLLECT_CONF/
-> Directories, which are so called 'backup-definitions'
$dir/
source -> file with the source
destination -> link to the destination
exclude -> \n seperated
--------------------------------------------------------------------------------
source - a rsync compatible source (one liner)
For instance:
backup_user@foreign_host:/home/server/video
or
rsync://[USER@]HOST[:PORT]/SRC
Have a look at rsync(1).
--------------------------------------------------------------------------------
verbose - should we log verbose or silent
If this file exists in the source specification -v will be passed to rsync.
--------------------------------------------------------------------------------
exclude - a new line seperated list of paths to exclude
--------------------------------------------------------------------------------
destination - a link to the destination directory
--------------------------------------------------------------------------------
intervalls/ - subdirectory of source or defaults
Each file below this directory describe an intervalls.
--------------------------------------------------------------------------------
log - link to file we should log to
If a backup source exists (the cconfig dir exists) all logs for this
source will be written to this file. General errors and errors of
non existent or broken configuration will be logged to stderr.
I do not think it is senseful to have one logfile for all sources, as
the sources can be backuped in parallel and you would not be able to
distinguish the different log processes very good then.
If you REALLY REALLY REALLY want to have all in one logfile, simply
link all "log" entries to the same file, output will be appended.
--------------------------------------------------------------------------------

53
doc/configuration.example Normal file
View file

@ -0,0 +1,53 @@
This is how I setup a backup host:
srwali01:~# mkdir /etc/ccollect
srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
srwali01:~# cd /etc/ccollect/
srwali01:/etc/ccollect# mkdir sources
srwali01:/etc/ccollect# cd sources/
srwali01:/etc/ccollect/sources# ls
srwali01:/etc/ccollect/sources# mkdir local-root
srwali01:/etc/ccollect/sources# cd local-root/
srwali01:/etc/ccollect/sources/local-root# echo / > source
srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
> /proc
> /sys
> /mnt
> EOF
srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
/o> ccollect.sh: Beginning backup using intervall taeglich
/=> Beginning to backup "local-root" ...
|-> 0 backup(s) already exist, keeping 28 backup(s).
# After that, add some more sources
srwali01:~# cd /etc/ccollect/sources
srwali01:/etc/ccollect/sources# mkdir windos-wl6
srwali01:/etc/ccollect/sources# cd windos-wl6/
srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
msrwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
srwali01:/etc/ccollect/sources/windos-wl6# cd ..
srwali01:/etc/ccollect/sources# mkdir windos-daten
srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
# Now add some remote source
srwali01:/etc/ccollect/sources/windos-daten# cd ..
srwali01:/etc/ccollect/sources# mkdir srwali03
srwali01:/etc/ccollect/sources# cd srwali03/
srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
> /proc
> /sys
> /mnt
> /home
> EOF
srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03