post_exec program to execute after backing up this source
@@ -257,7 +259,7 @@ human readable format before and after the whole backup process:If you add $CCOLLECT_CONF/defaults/option_name, the value will
+ /home/nico/vpn
If you add $CCOLLECT_CONF/defaults/option_name, the value will
be used in abscence of the option in a source. If you want to prevent
the default value to be used in a source, you can create the file
$CCOLLECT_CONF/sources/$name/no_option_name (i.e. prefix it with
@@ -265,7 +267,7 @@ the default value to be used in a source, you can create the file
[9:04] ikn2:ccollect% touch conf/sources/local/no_verbose
This enables the verbose option for all sources, but disables it for the
source local.
If an option is specified in the defaults folder and in the source,
the source specific version overrides the default one:
Example:
[9:05] ikn2:ccollect% echo "backup-host" > conf/defaults/remote_host
- [9:05] ikn2:ccollect% echo "different-host" > conf/sources/local/remote_host
You can use all source options as defaults, with the exception of
Detailed description of "source"
source describes a rsync compatible source (one line only).
For instance backup_user@foreign_host:/home/server/video.
+
Detailed description of "source"
source describes a rsync compatible source (one line only).
For instance backup_user@foreign_host:/home/server/video.
To use the rsync protocol without the ssh-tunnel, use
rsync::USER@HOST/SRC. For more information have a look at the manpage
-of rsync(1).
Detailed description of "destination"
destination must be a text file containing the destination directory.
+of rsync(1).
Detailed description of "destination"
destination must be a text file containing the destination directory.
destination USED to be a link to the destination directory in
earlier versions, so do not be confused if you see such examples.
Example:
[11:36] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/destination
- /home/nico/backupdir
Detailed description of "remote_host"
remote_host must be a text file containing the destination host.
+ /home/nico/backupdir
Detailed description of "remote_host"
remote_host must be a text file containing the destination host.
If this file is existing, you are backing up your data TO this host
and not to you local host.
Warning: You need to have ssh access to the remote host. rsync and
ccollect will connect to that host via ssh. ccollect needs the shell
access, because it needs to find out how many backups exist on the remote
host and to be able to delete them.
Example:
[10:17] denkbrett:ccollect-0.7.0% cat conf/sources/remote1/remote_host
- home.schottelius.org
It may contain all the ssh-specific values like myuser@yourhost.ch.
Detailed description of "verbose"
verbose tells ccollect that the log should contain verbose messages.
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
Detailed description of "very_verbose"
very_verbose tells ccollect that it should log very verbosely.
If this file exists in the source specification -v will be passed to
-rsync, rm and mkdir.
Example:
[23:67] nohost:~% touch conf/sources/testsource1/very_verbose
Detailed description of "summary"
If you create the file summary in the source definition,
+ home.schottelius.org
It may contain all the ssh-specific values like myuser@yourhost.ch.
Detailed description of "verbose"
verbose tells ccollect that the log should contain verbose messages.
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
Detailed description of "very_verbose"
very_verbose tells ccollect that it should log very verbosely.
If this file exists in the source specification -v will be passed to
+rsync, rm and mkdir.
Example:
[23:67] nohost:~% touch conf/sources/testsource1/very_verbose
Detailed description of "summary"
If you create the file summary in the source definition,
ccollect will present you a nice summary at the end.
backup:~# touch /etc/ccollect/sources/root/summary
backup:~# ccollect.sh werktags root
==> ccollect.sh: Beginning backup using interval werktags <==
@@ -313,11 +315,11 @@ backup:~# ccollect.sh werktags root
[root] Successfully finished backup.
==> Finished ccollect.sh <==
You could also combine it with verbose or very_verbose, but these
already print some statistics (though not all / the same as presented by
-summary).
Detailed description of "exclude"
exclude specifies a list of paths to exclude. The entries are seperated by a newline (\n).
Example:
[11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
+summary).
Detailed description of "exclude"
exclude specifies a list of paths to exclude. The entries are seperated by a newline (\n).
Example:
[11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
openvpn-2.0.1.tar.gz
nicht_reinnehmen
etwas mit leerzeichenli
- something with spaces is not a problemDetailed description of "intervals/"
When you create the subdirectory intervals/ in your source configuration
+ something with spaces is not a problem
Detailed description of "intervals/"
When you create the subdirectory intervals/ in your source configuration
directory, you can specify individiual intervals for this specific source.
Each file in this directory describes an interval.
Example:
[11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/
insgesamt 8
@@ -325,18 +327,18 @@ Each file in this directory describes an interval.Example:
Detailled description of "rsync_options"
When you create the file rsync_options in your source configuration,
+ 20
Detailled description of "rsync_options"
When you create the file rsync_options in your source configuration,
all the parameters in this file will be passed to rsync. This
way you can pass additional options to rsync. For instance you can tell rsync
to show progress ("--progress"), or which -password-file ("--password-file")
to use for automatic backup over the rsync-protocol.
Example:
[23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
- --password-file=/home/user/backup/protected_password_file
Detailled description of "pre_exec" and "post_exec"
When you create pre_exec and / or post_exec in your source
+ --password-file=/home/user/backup/protected_password_file
Detailled description of "pre_exec" and "post_exec"
When you create pre_exec and / or post_exec in your source
configuration, ccollect will execute this command before and
respectively after doing the backup for this specific source.
If you want to have pre-/post-exec before and after all
backups, see above for general configuration.
If pre_exec exits with a non-zero return code, the backup
process of this source will be aborted (i.e. backup skipped).
The post_exec script can access the following exported variables from
-ccollect:
-
+ccollect:
-
name: name of the source that is being backed up
-
destination_name: contains the base directory name (
daily.20091031-1013.24496)
@@ -353,32 +355,32 @@ df -h
#!/bin/sh
# Show whats free after
-df -h
Detailed description of "delete_incomplete"
If you create the file delete_incomplete in a source specification directory,
+df -h
Detailed description of "delete_incomplete"
If you create the file delete_incomplete in a source specification directory,
ccollect will look for incomplete backups (when the whole ccollect process
was interrupted) and remove them. Without this file ccollect will only warn
-the user.
Detailed description of "rsync_failure_codes"
If you have the file rsync_failure_codes in your source configuration
+the user.
Detailed description of "rsync_failure_codes"
If you have the file rsync_failure_codes in your source configuration
directory, it should contain a newline-separated list of numbers representing
rsync exit codes. If rsync exits with any code in this list, a marker will
be left in the destination directory indicating failure of this backup. If
you have enabled delete_incomplete, then this backup will be deleted during
-the next ccollect run on the same interval.
Detailed description of "mtime"
By default, ccollect.sh chooses the most recent backup directory for cloning or
+the next ccollect run on the same interval.
Detailed description of "mtime"
By default, ccollect.sh chooses the most recent backup directory for cloning or
the oldest for deletion based on the directory’s last change time (ctime).
With this option, the sorting is done based on modification time (mtime). With
this version of ccollect, the ctime and mtime of your backups will normally
be the same and this option has no effect. However, if you, for example, move
your backups to another hard disk using cp -a or rsync -a, you should use this
option because the ctimes are not preserved during such operations.
If you have any backups in your repository made with ccollect version 0.7.1 or
-earlier, do not use this option.
Detailed description of "quiet_if_down"
By default, ccollect.sh emits a series of error messages if a source is not
+earlier, do not use this option.
Detailed description of "quiet_if_down"
By default, ccollect.sh emits a series of error messages if a source is not
connectable. With this option enabled, ccollect still reports that the
source is not connectable but the associated error messages generated by
rsync or ssh are suppressed. You may want to use this option for sources,
-like notebook PCs, that are often disconnected.
Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging.
+like notebook PCs, that are often disconnected.