Advertisement
Guest User

rsnapshot.conf

a guest
Apr 17th, 2017
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.83 KB | None | 0 0
  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.  
  15. config_version 1.2
  16.  
  17. ###########################
  18. # SNAPSHOT ROOT DIRECTORY #
  19. ###########################
  20.  
  21. # All snapshots will be stored under this root directory.
  22. #
  23. snapshot_root /var/autofs/removable/usbdrive
  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 /bin/cp
  41.  
  42. # uncomment this to use the rm program instead of the built-in perl routine.
  43. #
  44. cmd_rm /bin/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 /usr/bin/rsync
  50.  
  51. # Uncomment this to enable remote ssh backups over rsync.
  52. #
  53. cmd_ssh /usr/bin/ssh
  54.  
  55. # Comment this out to disable syslog support.
  56. #
  57. cmd_logger /usr/bin/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 /usr/bin/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 /path/to/lvcreate
  83. #linux_lvm_cmd_lvremove /path/to/lvremove
  84. #linux_lvm_cmd_mount /bin/mount
  85. #linux_lvm_cmd_umount /bin/umount
  86.  
  87. #########################################
  88. # BACKUP LEVELS / INTERVALS #
  89. # Must be unique and in ascending order #
  90. # e.g. alpha, beta, gamma, etc. #
  91. #########################################
  92.  
  93. #retain alpha 6
  94. retain beta 7
  95. retain 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.  
  110. verbose 5
  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. #
  115. loglevel 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. #
  127. lockfile /var/run/rsnapshot.pid
  128.  
  129. # Default rsync args. All rsync commands have at least these options set.
  130. #
  131. #rsync_short_args -a
  132. #rsync_long_args --delete --numeric-ids --relative --delete-excluded
  133.  
  134. # ssh has no args passed by default, but you can specify some here.
  135. #
  136. #ssh_args -l /root/.ssh/rsync-key -p 22
  137.  
  138. # Default arguments for the "du" program (for disk space reporting).
  139. # The GNU version of "du" is preferred. See the man page for more details.
  140. # If your version of "du" doesn't support the -h flag, try -k flag instead.
  141. #
  142. #du_args -csh
  143.  
  144. # If this is enabled, rsync won't span filesystem partitions within a
  145. # backup point. This essentially passes the -x option to rsync.
  146. # The default is 0 (off).
  147. #
  148. #one_fs 0
  149.  
  150. # The include and exclude parameters, if enabled, simply get passed directly
  151. # to rsync. If you have multiple include/exclude patterns, put each one on a
  152. # separate line. Please look up the --include and --exclude options in the
  153. # rsync man page for more details on how to specify file name patterns.
  154. #
  155.  
  156. #include /home/bruce2/
  157. #include /root/
  158. #include /backup/
  159. #include /mnt/mmedia/Music/
  160. #exclude /export/
  161. #exclude /home/bruce2/.cache/
  162. #exclude /home/bruce2/.thumbnails/
  163. #exclude /lib/
  164. #exclude /lib32/
  165. #exclude /lib64/
  166. #exclude /run/
  167. #exclude /sbin/
  168. #exclude /tmp/
  169. #exclude /usr/
  170. #exclude /var/
  171. #exclude /sys/
  172. #exclude /boot/
  173. #exclude /bin/
  174. #exclude /proc/
  175. #exclude /opt/
  176. #exclude /media/
  177. #exclude /lost+found/
  178. #exclude /dev/
  179. #exclude /mnt/mmedia/tv/
  180. #exclude /mnt/mmedia/movies/
  181. #exclude /mnt/mmedia/ADownloads/
  182. #exclude /mnt/mmedia/Azureus Downloads/
  183. #exclude /mnt/mmedia/Books/
  184. #exclude /mnt/mmedia/Music_Videos/
  185. #exclude /mnt/mmedia/lost+found/
  186. #exclude /mnt/mmedia/
  187.  
  188.  
  189.  
  190. # The include_file and exclude_file parameters, if enabled, simply get
  191. # passed directly to rsync. Please look up the --include-from and
  192. # --exclude-from options in the rsync man page for more details.
  193. #
  194. #include_file /path/to/include/file
  195. #exclude_file /home/bruce2/exclude.txt
  196.  
  197. # If your version of rsync supports --link-dest, consider enabling this.
  198. # This is the best way to support special files (FIFOs, etc) cross-platform.
  199. # The default is 0 (off).
  200. #
  201. #link_dest 0
  202.  
  203. # When sync_first is enabled, it changes the default behaviour of rsnapshot.
  204. # Normally, when rsnapshot is called with its lowest interval
  205. # (i.e.: "rsnapshot alpha"), it will sync files AND rotate the lowest
  206. # intervals. With sync_first enabled, "rsnapshot sync" handles the file sync,
  207. # and all interval calls simply rotate files. See the man page for more
  208. # details. The default is 0 (off).
  209. #
  210. #sync_first 0
  211.  
  212. # If enabled, rsnapshot will move the oldest directory for each interval
  213. # to [interval_name].delete, then it will remove the lockfile and delete
  214. # that directory just before it exits. The default is 0 (off).
  215. #
  216. #use_lazy_deletes 0
  217.  
  218. # Number of rsync re-tries. If you experience any network problems or
  219. # network card issues that tend to cause ssh to fail with errors like
  220. # "Corrupted MAC on input", for example, set this to a non-zero value
  221. # to have the rsync operation re-tried.
  222. #
  223. #rsync_numtries 0
  224.  
  225. # LVM parameters. Used to backup with creating lvm snapshot before backup
  226. # and removing it after. This should ensure consistency of data in some special
  227. # cases
  228. #
  229. # LVM snapshot(s) size (lvcreate --size option).
  230. #
  231. #linux_lvm_snapshotsize 100M
  232.  
  233. # Name to be used when creating the LVM logical volume snapshot(s).
  234. #
  235. #linux_lvm_snapshotname rsnapshot
  236.  
  237. # Path to the LVM Volume Groups.
  238. #
  239. #linux_lvm_vgpath /dev
  240.  
  241. # Mount point to use to temporarily mount the snapshot(s).
  242. #
  243. #linux_lvm_mountpath /path/to/mount/lvm/snapshot/during/backup
  244.  
  245. ###############################
  246. ### BACKUP POINTS / SCRIPTS ###
  247. ###############################
  248.  
  249. # LOCALHOST
  250. backup / localhost/
  251. #backup /etc/ localhost/
  252. #backup /usr/local/ localhost/
  253. #backup /var/log/rsnapshot localhost/
  254. #backup /etc/passwd localhost/
  255. #backup /home/foo/My Documents/ localhost/
  256. #backup /foo/bar/ localhost/ one_fs=1, rsync_short_args=-urltvpog
  257. #backup_script /usr/local/bin/backup_pgsql.sh localhost/postgres/
  258. # You must set linux_lvm_* parameters below before using lvm snapshots
  259. #backup lvm://vg0/xen-home/ lvm-vg0/xen-home/
  260.  
  261. # EXAMPLE.COM
  262. #backup_exec /bin/date "+ backup of example.com started at %c"
  263. #backup root@example.com:/home/ example.com/ +rsync_long_args=--bwlimit=16,exclude=core
  264. #backup root@example.com:/etc/ example.com/ exclude=mtab,exclude=core
  265. #backup_exec ssh root@example.com "mysqldump -A > /var/db/dump/mysql.sql"
  266. #backup root@example.com:/var/db/dump/ example.com/
  267. #backup_exec /bin/date "+ backup of example.com ended at %c"
  268.  
  269. # CVS.SOURCEFORGE.NET
  270. #backup_script /usr/local/bin/backup_rsnapshot_cvsroot.sh rsnapshot.cvs.sourceforge.net/
  271.  
  272. # RSYNC.SAMBA.ORG
  273. #backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/
  274.  
  275. # Rsync
  276. backup backup@xxxxxxxxxx:/var/www/localhost/htdocs/ localhost/
  277. backup backup@xxxxxxxxxx:/var/lib/gallery/g2data/albums/ localhost/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement