187 lines
6.3 KiB
Text
187 lines
6.3 KiB
Text
--------------------------------------------------------------------------------
|
|
Configuration of ccollect.sh
|
|
Nico Schottelius, 2005-12-07
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
0. Runtime options
|
|
1. General configuration
|
|
1.2. Intervall definition
|
|
2. Source configuration
|
|
2.1. Detailled description of "source"
|
|
2.2. Detailled description of "verbose"
|
|
2.3. Detailled description of "exclude"
|
|
2.4. Detailled description of "destination"
|
|
2.5. Detailled description of "intervalls/"
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
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 generally valid for
|
|
all source definitions. Though the values can be overwritten in the source
|
|
configuration.
|
|
|
|
All configuration entries are plain-text (use UTF-8 if you use
|
|
non ASCII characters) 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.
|
|
|
|
Example:
|
|
|
|
[10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
|
|
insgesamt 12
|
|
-rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily
|
|
-rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly
|
|
-rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly
|
|
[10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
|
|
28
|
|
12
|
|
4
|
|
|
|
This means to keep 28 daily backups, 12 monthly backups and 4 weekly.
|
|
|
|
--------------------------------------------------------------------------------
|
|
2. Source configuration
|
|
|
|
Each source configuration exists below $CCOLLECT_CONF/sources/$name or
|
|
/etc/ccollect/sources/$name.
|
|
|
|
The name you choose for the subdirectory describes the source.
|
|
|
|
Each source has at least the following files:
|
|
|
|
- source (a text file containing the rsync compatible 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 (passes -v to rsync)
|
|
- exclude exclude list for rsync. One exclude specification on each line.
|
|
|
|
Example:
|
|
[10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2
|
|
insgesamt 12
|
|
lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir
|
|
-rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude
|
|
drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls
|
|
-rw-r--r-- 1 nico users 15 2005-11-17 16:44 source
|
|
[10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
|
|
openvpn-2.0.1.tar.gz
|
|
nicht_reinnehmen
|
|
etwas mit leerzeichenli
|
|
[10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls
|
|
insgesamt 4
|
|
-rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily
|
|
[10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
|
|
5
|
|
[10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
|
|
/home/nico/vpn
|
|
|
|
|
|
2.1. Detailled description of "source"
|
|
|
|
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).
|
|
|
|
2.2. Detailled description of "verbose"
|
|
|
|
verbose - should we log verbose or silent
|
|
|
|
If this file exists in the source specification -v will be passed to rsync.
|
|
|
|
Example:
|
|
[11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
|
|
|
|
|
|
2.3. Detailled description of "exclude"
|
|
|
|
exclude - a new line seperated list of paths to exclude
|
|
|
|
Example:
|
|
|
|
[11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
|
|
openvpn-2.0.1.tar.gz
|
|
nicht_reinnehmen
|
|
etwas mit leerzeichenli
|
|
|
|
|
|
2.4. Detailled description of "destination"
|
|
|
|
destination - a link to the destination directory
|
|
|
|
Example:
|
|
[11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
|
|
lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
|
|
|
|
2.5. Detailled description of "intervalls/"
|
|
|
|
intervalls/ - subdirectory of source or defaults
|
|
|
|
Each file below this directory describe an intervalls.
|
|
|
|
Example:
|
|
[11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
|
|
insgesamt 8
|
|
-rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily
|
|
-rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly
|
|
[11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/*
|
|
5
|
|
20
|
|
|
|
--------------------------------------------------------------------------------
|
|
NOT IMPLEMENTED BELOW THE FOLLIWNG LINE
|
|
--------------------------------------------------------------------------------
|
|
|
|
2.6. Detailled description of "log"
|
|
|
|
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.
|