122 lines
4.3 KiB
Text
122 lines
4.3 KiB
Text
--------------------------------------------------------------------------------
|
|
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.
|
|
--------------------------------------------------------------------------------
|
|
|