rsnapshot.conf 8.1 KB

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