1################################################# 2# rsnapshot.conf - rsnapshot configuration file # 3################################################# 4# # 5# PLEASE BE AWARE OF THE FOLLOWING RULE: # 6# # 7# This file requires tabs between elements # 8# # 9################################################# 10 11####################### 12# CONFIG FILE VERSION # 13####################### 14 15config_version 1.2 16 17########################### 18# SNAPSHOT ROOT DIRECTORY # 19########################### 20 21# All snapshots will be stored under this root directory. 22# 23snapshot_root /.snapshots/ 24 25# If no_create_root is enabled, rsnapshot will not automatically create the 26# snapshot_root directory. This is particularly useful if you are backing 27# up to removable media, such as a FireWire or USB drive. 28# 29#no_create_root 1 30 31################################# 32# EXTERNAL PROGRAM DEPENDENCIES # 33################################# 34 35# LINUX USERS: Be sure to uncomment "cmd_cp". This gives you extra features. 36# EVERYONE ELSE: Leave "cmd_cp" commented out for compatibility. 37# 38# See the README file or the man page for more details. 39# 40#@CMD_CP@ 41 42# uncomment this to use the rm program instead of the built-in perl routine. 43# 44@CMD_RM@ 45 46# rsync must be enabled for anything to work. This is the only command that 47# must be enabled. 48# 49@CMD_RSYNC@ 50 51# Uncomment this to enable remote ssh backups over rsync. 52# 53#@CMD_SSH@ 54 55# Comment this out to disable syslog support. 56# 57@CMD_LOGGER@ 58 59# Uncomment this to specify the path to "du" for disk usage checks. 60# If you have an older version of "du", you may also want to check the 61# "du_args" parameter below. 62# 63#@CMD_DU@ 64 65# Uncomment this to specify the path to rsnapshot-diff. 66# 67#cmd_rsnapshot_diff /usr/local/bin/rsnapshot-diff 68 69# Specify the path to a script (and any optional arguments) to run right 70# before rsnapshot syncs files 71# 72#cmd_preexec /path/to/preexec/script 73 74# Specify the path to a script (and any optional arguments) to run right 75# after rsnapshot syncs files 76# 77#cmd_postexec /path/to/postexec/script 78 79# Paths to lvcreate, lvremove, mount and umount commands, for use with 80# Linux LVMs. 81# 82#linux_lvm_cmd_lvcreate @CMD_LVCREATE@ 83#linux_lvm_cmd_lvremove @CMD_LVREMOVE@ 84#linux_lvm_cmd_mount @CMD_MOUNT@ 85#linux_lvm_cmd_umount @CMD_UMOUNT@ 86 87######################################### 88# BACKUP LEVELS / INTERVALS # 89# Must be unique and in ascending order # 90# e.g. alpha, beta, gamma, etc. # 91######################################### 92 93retain alpha 6 94retain beta 7 95retain gamma 4 96#retain delta 3 97 98############################################ 99# GLOBAL OPTIONS # 100# All are optional, with sensible defaults # 101############################################ 102 103# Verbose level, 1 through 5. 104# 1 Quiet Print fatal errors only 105# 2 Default Print errors and warnings only 106# 3 Verbose Show equivalent shell commands being executed 107# 4 Extra Verbose Show extra verbose information 108# 5 Debug mode Everything 109# 110verbose 2 111 112# Same as "verbose" above, but controls the amount of data sent to the 113# logfile, if one is being used. The default is 3. 114# 115loglevel 3 116 117# If you enable this, data will be written to the file you specify. The 118# amount of data written is controlled by the "loglevel" parameter. 119# 120#logfile /var/log/rsnapshot 121 122# If enabled, rsnapshot will write a lockfile to prevent two instances 123# from running simultaneously (and messing up the snapshot_root). 124# If you enable this, make sure the lockfile directory is not world 125# writable. Otherwise anyone can prevent the program from running. 126# 127lockfile /var/run/rsnapshot.pid 128 129# By default, rsnapshot check lockfile, check if PID is running 130# and if not, consider lockfile as stale, then start 131# Enabling this stop rsnapshot if PID in lockfile is not running 132# 133#stop_on_stale_lockfile 0 134 135# Default rsync args. All rsync commands have at least these options set. 136# 137#rsync_short_args -a 138#rsync_long_args --delete --numeric-ids --relative --delete-excluded 139 140# ssh has no args passed by default, but you can specify some here. 141# 142#ssh_args -p 22 143 144# Default arguments for the "du" program (for disk space reporting). 145# The GNU version of "du" is preferred. See the man page for more details. 146# If your version of "du" doesn't support the -h flag, try -k flag instead. 147# 148#du_args -csh 149 150# If this is enabled, rsync won't span filesystem partitions within a 151# backup point. This essentially passes the -x option to rsync. 152# The default is 0 (off). 153# 154#one_fs 0 155 156# The include and exclude parameters, if enabled, simply get passed directly 157# to rsync. If you have multiple include/exclude patterns, put each one on a 158# separate line. Please look up the --include and --exclude options in the 159# rsync man page for more details on how to specify file name patterns. 160# 161#include ??? 162#include ??? 163#exclude ??? 164#exclude ??? 165 166# The include_file and exclude_file parameters, if enabled, simply get 167# passed directly to rsync. Please look up the --include-from and 168# --exclude-from options in the rsync man page for more details. 169# 170#include_file /path/to/include/file 171#exclude_file /path/to/exclude/file 172 173# If your version of rsync supports --link-dest, consider enabling this. 174# This is the best way to support special files (FIFOs, etc) cross-platform. 175# The default is 0 (off). 176# 177#link_dest 0 178 179# When sync_first is enabled, it changes the default behaviour of rsnapshot. 180# Normally, when rsnapshot is called with its lowest interval 181# (i.e.: "rsnapshot alpha"), it will sync files AND rotate the lowest 182# intervals. With sync_first enabled, "rsnapshot sync" handles the file sync, 183# and all interval calls simply rotate files. See the man page for more 184# details. The default is 0 (off). 185# 186#sync_first 0 187 188# If enabled, rsnapshot will move the oldest directory for each interval 189# to [interval_name].delete, then it will remove the lockfile and delete 190# that directory just before it exits. The default is 0 (off). 191# 192#use_lazy_deletes 0 193 194# Number of rsync re-tries. If you experience any network problems or 195# network card issues that tend to cause ssh to fail with errors like 196# "Corrupted MAC on input", for example, set this to a non-zero value 197# to have the rsync operation re-tried. 198# 199#rsync_numtries 0 200 201# LVM parameters. Used to backup with creating lvm snapshot before backup 202# and removing it after. This should ensure consistency of data in some special 203# cases 204# 205# LVM snapshot(s) size (lvcreate --size option). 206# 207#linux_lvm_snapshotsize 100M 208 209# Name to be used when creating the LVM logical volume snapshot(s). 210# 211#linux_lvm_snapshotname rsnapshot 212 213# Path to the LVM Volume Groups. 214# 215#linux_lvm_vgpath /dev 216 217# Mount point to use to temporarily mount the snapshot(s). 218# 219#linux_lvm_mountpath /path/to/mount/lvm/snapshot/during/backup 220 221############################### 222### BACKUP POINTS / SCRIPTS ### 223############################### 224 225# LOCALHOST 226backup /home/ localhost/ 227backup /etc/ localhost/ 228backup /usr/local/ localhost/ 229#backup /var/log/rsnapshot localhost/ 230#backup /etc/passwd localhost/ 231#backup /home/foo/My Documents/ localhost/ 232#backup /foo/bar/ localhost/ one_fs=1,rsync_short_args=-urltvpog 233#backup_script /usr/local/bin/backup_pgsql.sh localhost/postgres/ 234# You must set linux_lvm_* parameters below before using lvm snapshots 235#backup lvm://vg0/xen-home/ lvm-vg0/xen-home/ 236 237# EXAMPLE.COM 238#backup_exec /bin/date "+ backup of example.com started at %c" 239#backup root@example.com:/home/ example.com/ +rsync_long_args=--bwlimit=16,exclude=core 240#backup root@example.com:/etc/ example.com/ exclude=mtab,exclude=core 241#backup_exec ssh root@example.com "mysqldump -A > /var/db/dump/mysql.sql" 242#backup root@example.com:/var/db/dump/ example.com/ 243#backup_exec /bin/date "+ backup of example.com ended at %c" 244 245# CVS.SOURCEFORGE.NET 246#backup_script /usr/local/bin/backup_rsnapshot_cvsroot.sh rsnapshot.cvs.sourceforge.net/ 247 248# RSYNC.SAMBA.ORG 249#backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/ 250