1rsnapshot(1) rsnapshot(1)
2
3
4
6 rsnapshot - remote filesystem snapshot utility
7
9 rsnapshot [-vtxqVD] [-c cfgfile] [command] [args]
10
12 rsnapshot is a filesystem snapshot utility. It can take incremental
13 snapshots of local and remote filesystems for any number of machines.
14
15 Local filesystem snapshots are handled with rsync(1). Secure remote
16 connections are handled with rsync over ssh(1), while anonymous rsync
17 connections simply use an rsync server. Both remote and local transfers
18 depend on rsync.
19
20 rsnapshot saves much more disk space than you might imagine. The amount
21 of space required is roughly the size of one full backup, plus a copy
22 of each additional file that is changed. rsnapshot makes extensive use
23 of hard links, so if the file doesn't change, the next snapshot is
24 simply a hard link to the exact same file.
25
26 rsnapshot will typically be invoked as root by a cron job, or series of
27 cron jobs. It is possible, however, to run as any arbitrary user with
28 an alternate configuration file.
29
30 All important options are specified in a configuration file, which is
31 located by default at /etc/rsnapshot.conf. An alternate file can be
32 specified on the command line. There are also additional options which
33 can be passed on the command line.
34
35 The command line options are as follows:
36
37 -v verbose, show shell commands being executed
38
39 -t test, show shell commands that would be executed
40
41 -c path to alternate config file
42
43 -x one filesystem, don't cross partitions within each backup point
44
45 -q quiet, suppress non-fatal warnings
46
47 -V same as -v, but with more detail
48
49 -D a firehose of diagnostic information
50
52 /etc/rsnapshot.conf is the default configuration file. All parameters
53 in this file must be separated by tabs. /etc/rsnapshot.conf.default can
54 be used as a reference.
55
56 It is recommended that you copy /etc/rsnapshot.conf.default to
57 /etc/rsnapshot.conf, and then modify /etc/rsnapshot.conf to suit your
58 needs.
59
60 Long lines may be split over several lines. "Continuation" lines must
61 begin with a space or a tab character. Continuation lines will have
62 all leading and trailing whitespace stripped off, and then be appended
63 with an intervening tab character to the previous line when the
64 configuation file is parsed.
65
66 Here is a list of allowed parameters:
67
68 config_version Config file version (required). Default is 1.2
69
70 snapshot_root Local filesystem path to save all snapshots
71
72 include_conf Include another file in the configuration at
73 this point.
74
75 This is recursive, but you may need to be careful about paths
76 when specifying which file to include. We check to see if the
77 file you have specified is readable, and will yell an error if
78 it isn't. We recommend using a full path. As a special case,
79 include_conf's value may be enclosed in `backticks` in which
80 case it will be executed and whatever it spits to STDOUT will
81 be included in the configuration. Note that shell meta-
82 characters may be interpreted.
83
84 no_create_root If set to 1, rsnapshot won't create
85 snapshot_root directory
86
87 cmd_rsync Full path to rsync (required)
88
89 cmd_ssh Full path to ssh (optional)
90
91 cmd_cp Full path to cp (optional, but must be GNU
92 version)
93
94 If you are using Linux, you should uncomment cmd_cp. If you are
95 using a platform which does not have GNU cp, you should leave
96 cmd_cp commented out.
97
98 With GNU cp, rsnapshot can take care of both normal files and
99 special files (such as FIFOs, sockets, and block/character
100 devices) in one pass.
101
102 If cmd_cp is disabled, rsnapshot will use its own built-in
103 function, native_cp_al() to backup up regular files and
104 directories. This will then be followed up by a separate call
105 to rsync, to move the special files over (assuming there are
106 any).
107
108 cmd_rm Full path to rm (optional)
109
110 cmd_logger Full path to logger (optional, for syslog
111 support)
112
113 cmd_du Full path to du (optional, for disk usage
114 reports)
115
116 cmd_rsnapshot_diff Full path to rsnapshot-diff (optional)
117
118 cmd_preexec
119
120 Full path (plus any arguments) to preexec script (optional).
121 This script will run immediately before each backup operation
122 (but not any rotations).
123
124 cmd_postexec
125
126 Full path (plus any arguments) to postexec script (optional).
127 This script will run immediately after each backup operation
128 (but not any rotations).
129
130 linux_lvm_cmd_lvcreate
131
132 linux_lvm_cmd_lvremove
133
134 linux_lvm_cmd_mount
135
136 linux_lvm_cmd_umount
137
138 Paths to lvcreate, lvremove, mount and umount commands, for use
139 with Linux LVMs. The lvcreate, lvremove, mount and umount
140 commands are required for managing snapshots of LVM volumes and
141 are otherwise optional.
142
143 retain [name] [number]
144
145 "name" refers to the name of this backup level (e.g., hourly,
146 daily, so also called the 'interval'). "number" is the number
147 of snapshots for this type of interval that will be retained.
148 The value of "name" will be the command passed to rsnapshot to
149 perform this type of backup.
150
151 A deprecated alias for 'retain' is 'interval'.
152
153 Example: retain hourly 6
154
155 [root@localhost]# rsnapshot hourly
156
157 For this example, every time this is run, the following will
158 happen:
159
160 <snapshot_root>/hourly.5/ will be deleted, if it exists.
161
162 <snapshot_root>/hourly.{1,2,3,4} will all be rotated +1, if
163 they exist.
164
165 <snapshot_root>/hourly.0/ will be copied to
166 <snapshot_root>/hourly.1/ using hard links.
167
168 Each backup point (explained below) will then be rsynced to the
169 corresponding directories in <snapshot_root>/hourly.0/
170
171 Backup levels must be specified in the config file in order,
172 from most frequent to least frequent. The first entry is the
173 one which will be synced with the backup points. The subsequent
174 backup levels (e.g., daily, weekly, etc) simply rotate, with
175 each higher backup level pulling from the one below it for its
176 .0 directory.
177
178 Example:
179
180 retain hourly 6
181
182 retain daily 7
183
184 retain weekly 4
185
186 daily.0/ will be copied from hourly.5/, and weekly.0/ will be
187 copied from daily.6/
188
189 hourly.0/ will be rsynced directly from the filesystem.
190
191 link_dest 1
192
193 If your version of rsync supports --link-dest (2.5.7 or newer),
194 you can enable this to let rsync handle some things that GNU cp
195 or the built-in subroutines would otherwise do. Enabling this
196 makes rsnapshot take a slightly more complicated code branch,
197 but it's the best way to support special files on non-Linux
198 systems.
199
200 sync_first 1
201
202 sync_first changes the behaviour of rsnapshot. When this is
203 enabled, all calls to rsnapshot with various backup levels
204 simply rotate files. All backups are handled by calling
205 rsnapshot with the "sync" argument. The synced files are stored
206 in a ".sync" directory under the snapshot_root.
207
208 This allows better recovery in the event that rsnapshot is
209 interrupted in the middle of a sync operation, since the sync
210 step and rotation steps are separated. This also means that you
211 can easily run "rsnapshot sync" on the command line without
212 fear of forcing all the other directories to rotate up. This
213 benefit comes at the cost of one more snapshot worth of disk
214 space. The default is 0 (off).
215
216 verbose 2
217
218 The amount of information to print out when the program is run.
219 Allowed values are 1 through 5. The default is 2.
220
221 1 Quiet Show fatal errors only
222 2 Default Show warnings and errors
223 3 Verbose Show equivalent shell commands being executed
224 4 Extra Verbose Same as verbose, but with more detail
225 5 Debug All kinds of information
226
227 loglevel 3
228
229 This number means the same thing as verbose above, but it
230 determines how much data is written to the logfile, if one is
231 being written.
232
233 The only thing missing from this at the higher levels is the
234 direct output from rsync. We hope to add support for this in a
235 future release.
236
237 logfile /var/log/rsnapshot
238
239 Full filesystem path to the rsnapshot log file. If this is
240 defined, a log file will be written, with the amount of data
241 being controlled by loglevel. If this is commented out, no log
242 file will be written.
243
244 include [file-name-pattern]
245
246 This gets passed directly to rsync using the --include
247 directive. This parameter can be specified as many times as
248 needed, with one pattern defined per line. See the rsync(1) man
249 page for the syntax.
250
251 exclude [file-name-pattern]
252
253 This gets passed directly to rsync using the --exclude
254 directive. This parameter can be specified as many times as
255 needed, with one pattern defined per line. See the rsync(1) man
256 page for the syntax.
257
258 include_file /path/to/include/file
259
260 This gets passed directly to rsync using the --include-from
261 directive. See the rsync(1) man page for the syntax.
262
263 exclude_file /path/to/exclude/file
264
265 This gets passed directly to rsync using the --exclude-from
266 directive. See the rsync(1) man page for the syntax.
267
268 rsync_short_args -a
269
270 List of short arguments to pass to rsync. If not specified,
271 "-a" is the default. Please note that these must be all next to
272 each other. For example, "-az" is valid, while "-a -z" is not.
273
274 "-a" is rsync's "archive mode" which tells it to copy as much
275 of the filesystem metadata as it can for each file. This
276 specifically does *not* include information about hard links,
277 as that would greatly increase rsync's memory usage and slow it
278 down. If you need to preserve hard links in your backups, then
279 add "H" to this.
280
281 rsync_long_args --delete --numeric-ids --relative
282 --delete-excluded
283
284 List of long arguments to pass to rsync. Beginning with
285 rsnapshot 1.2.0, this default has changed. In previous
286 versions, the default values were
287
288 --delete --numeric-ids
289
290 Starting with version 1.2.0, the default values are
291
292 --delete --numeric-ids --relative --delete-excluded
293
294 This directly affects how the destination paths in your backup
295 points are constructed. Depending on what behaviour you want,
296 you can explicitly set the values to make the program behave
297 like the old version or the current version. The newer settings
298 are recommended if you're just starting. If you are upgrading,
299 read the upgrade guide in the INSTALL file in the source
300 distribution for more information.
301
302 Quotes are permitted in rsync_long_args, eg --rsync-path="sudo
303 /usr/bin/rsync". You may use either single (') or double (")
304 quotes, but nested quotes (including mixed nested quotes) are
305 not permitted. Similar quoting is also allowed in per-backup-
306 point rsync_long_args.
307
308 ssh_args -p 22
309
310 Arguments to be passed to ssh. If not specified, the default is
311 none.
312
313 du_args -csh
314
315 Arguments to be passed to du. If not specified, the default is
316 -csh. GNU du supports -csh, BSD du supports -csk, Solaris du
317 doesn't support -c at all. The GNU version is recommended,
318 since it offers the most features.
319
320 lockfile /var/run/rsnapshot.pid
321
322 stop_on_stale_lockfile 0
323
324 Lockfile to use when rsnapshot is run. This prevents a second
325 invocation from clobbering the first one. If not specified, no
326 lock file is used. Make sure to use a directory that is not
327 world writeable for security reasons. Use of a lock file is
328 strongly recommended.
329
330 If a lockfile exists when rsnapshot starts, it will try to read
331 the file and stop with an error if it can't. If it *can* read
332 the file, it sees if a process exists with the PID noted in the
333 file. If it does, rsnapshot stops with an error message. If
334 there is no process with that PID, then we assume that the
335 lockfile is stale and ignore it *unless* stop_on_stale_lockfile
336 is set to 1 in which case we stop.
337
338 stop_on_stale_lockfile defaults to 0.
339
340 one_fs 1
341
342 Prevents rsync from crossing filesystem partitions. Setting
343 this to a value of 1 enables this feature. 0 turns it off. This
344 parameter is optional. The default is 0 (off).
345
346 use_lazy_deletes 1
347
348 Changes default behavior of rsnapshot and does not initially
349 remove the oldest snapshot. Instead it moves that directory to
350 _delete.[processid] and continues as normal. Once the backup
351 has been completed, the lockfile will be removed before
352 rsnapshot starts deleting the directory.
353
354 Enabling this means that snapshots get taken sooner (since the
355 delete doesn't come first), and any other rsnapshot processes
356 are allowed to start while the final delete is happening. This
357 benefit comes at the cost of using more disk space. The default
358 is 0 (off).
359
360 The details of how this works have changed in rsnapshot version
361 1.3.1. Originally you could only ever have one .delete
362 directory per backup level. Now you can have many, so if your
363 next (eg) hourly backup kicks off while the previous one is
364 still doing a lazy delete you may temporarily have extra
365 _delete directories hanging around.
366
367 linux_lvm_snapshotsize 2G
368
369 LVM snapshot(s) size (lvcreate --size option).
370
371 linux_lvm_snapshotname rsnapshot
372
373 Name to be used when creating the LVM logical volume
374 snapshot(s) (lvcreate --name option).
375
376 linux_lvm_vgpath /dev
377
378 Path to the LVM Volume Groups.
379
380 linux_lvm_mountpath /mnt/lvm-snapshot
381
382 Mount point to use to temporarily mount the snapshot(s).
383
384 UPGRADE NOTICE:
385
386 If you have used an older version of rsnapshot, you might
387 notice that the destination paths on the backup points have
388 changed. Please read the INSTALL file in the source
389 distribution for upgrade options.
390
391 backup /etc/ localhost/
392
393 backup root@example.com:/etc/ example.com/
394
395 backup rsync://example.com/path2/ example.com/
396
397 backup /var/ localhost/ one_fs=1
398
399 backup lvm://vg0/home/path2/ lvm-vg0/
400
401 backup_script /usr/local/bin/backup_pgsql.sh pgsql_backup/
402
403 Examples:
404
405 backup /etc/ localhost/
406
407 Backs up /etc/ to <snapshot_root>/<retain>.0/localhost/etc/
408 using rsync on the local filesystem
409
410 backup /usr/local/ localhost/
411
412 Backs up /usr/local/ to
413 <snapshot_root>/<retain>.0/localhost/usr/local/ using rsync
414 on the local filesystem
415
416 backup root@example.com:/etc/ example.com/
417
418 Backs up root@example.com:/etc/ to
419 <snapshot_root>/<retain>.0/example.com/etc/ using rsync
420 over ssh
421
422 backup root@example.com:/usr/local/ example.com/
423
424 Backs up root@example.com:/usr/local/ to
425 <snapshot_root>/<retain>.0/example.com/usr/local/ using
426 rsync over ssh
427
428 backup rsync://example.com/pub/ example.com/pub/
429
430 Backs up rsync://example.com/pub/ to
431 <snapshot_root>/<retain>.0/example.com/pub/ using an
432 anonymous rsync server. Please note that unlike backing up
433 local paths and using rsync over ssh, rsync servers have
434 "modules", which are top level directories that are
435 exported. Therefore, the module should also be specified in
436 the destination path, as shown in the example above (the
437 pub/ directory at the end).
438
439 backup /var/ localhost/ one_fs=1
440
441 This is the same as the other examples, but notice the
442 fourth column. This is how you specify per-backup-point
443 options to over-ride global settings. This extra parameter
444 can take several options, separated by commas.
445
446 It is most useful when specifying per-backup rsync excludes
447 thus:
448
449 backup root@somehost:/ somehost
450 +rsync_long_args=--exclude=/var/spool/
451
452 Note the + sign. That tells rsnapshot to add to the list
453 of arguments to pass to rsync instead of replacing the
454 list.
455
456 backup lvm://vg0/home/path2/ lvm-vg0/
457
458 Backs up the LVM logical volume called home, of volume
459 group vg0, to <snapshot_root>/<interval>.0/lvm-vg0/. Will
460 create, mount, backup, unmount and remove an LVM snapshot
461 for each lvm:// entry.
462
463 backup_script /usr/local/bin/backup_database.sh
464 db_backup/
465
466 In this example, we specify a script or program to run.
467 This script should simply create files and/or directories
468 in its current working directory. rsnapshot will then take
469 that output and move it into the directory specified in the
470 third column.
471
472 Please note that whatever is in the destination directory
473 will be completely deleted and recreated. For this reason,
474 rsnapshot prevents you from specifying a destination
475 directory for a backup_script that will clobber other
476 backups.
477
478 So in this example, say the backup_database.sh script
479 simply runs a command like:
480
481 #!/bin/sh
482
483 mysqldump -uusername mydatabase > mydatabase.sql
484
485 chmod u=r,go= mydatabase.sql # r-------- (0400)
486
487 rsnapshot will take the generated "mydatabase.sql" file and
488 move it into the <snapshot_root>/<retain>.0/db_backup/
489 directory. On subsequent runs, rsnapshot checks the
490 differences between the files created against the previous
491 files. If the backup script generates the same output on
492 the next run, the files will be hard linked against the
493 previous ones, and no additional disk space will be taken
494 up.
495
496 Remember that tabs must separate all elements, and that there must
497 be a trailing slash on the end of every directory.
498
499 A hash mark (#) on the beginning of a line is treated as a comment.
500
501 Putting it all together (an example file):
502
503 # THIS IS A COMMENT, REMEMBER TABS MUST SEPARATE ALL ELEMENTS
504
505 config_version 1.2
506
507 snapshot_root /.snapshots/
508
509 cmd_rsync /usr/bin/rsync
510 cmd_ssh /usr/bin/ssh
511 #cmd_cp /bin/cp
512 cmd_rm /bin/rm
513 cmd_logger /usr/bin/logger
514 cmd_du /usr/bin/du
515
516 linux_lvm_cmd_lvcreate /sbin/lvcreate
517 linux_lvm_cmd_lvremove /sbin/lvremove
518 linux_lvm_cmd_mount /bin/mount
519 linux_lvm_cmd_umount /bin/umount
520
521 linux_lvm_snapshotsize 2G
522 linux_lvm_snapshotname rsnapshot
523 linux_lvm_vgpath /dev
524 linux_lvm_mountpath /mnt/lvm-snapshot
525
526 retain hourly 6
527 retain daily 7
528 retain weekly 7
529 retain monthly 3
530
531 backup /etc/ localhost/
532 backup /home/ localhost/
533 backup_script /usr/local/bin/backup_mysql.sh mysql_backup/
534
535 backup root@foo.com:/etc/ foo.com/
536 backup root@foo.com:/home/ foo.com/
537 backup root@mail.foo.com:/home/ mail.foo.com/
538 backup rsync://example.com/pub/ example.com/pub/
539 backup lvm://vg0/xen-home/ lvm-vg0/xen-home/
540
542 rsnapshot can be used by any user, but for system-wide backups you will
543 probably want to run it as root.
544
545 Since backups usually get neglected if human intervention is required,
546 the preferred way is to run it from cron.
547
548 When you are first setting up your backups, you will probably also want
549 to run it from the command line once or twice to get a feel for what
550 it's doing.
551
552 Here is an example crontab entry, assuming that backup levels hourly,
553 daily, weekly and monthly have been defined in /etc/rsnapshot.conf
554
555 0 */4 * * * /usr/local/bin/rsnapshot hourly
556
557 50 23 * * * /usr/local/bin/rsnapshot daily
558
559 40 23 * * 6 /usr/local/bin/rsnapshot weekly
560
561 30 23 1 * * /usr/local/bin/rsnapshot monthly
562
563 This example will do the following:
564
565 6 hourly backups a day (once every 4 hours, at 0,4,8,12,16,20)
566
567 1 daily backup every day, at 11:50PM
568
569 1 weekly backup every week, at 11:40PM, on Saturdays (6th day of
570 week)
571
572 1 monthly backup every month, at 11:30PM on the 1st day of the
573 month
574
575 It is usually a good idea to schedule the larger backup levels to run a
576 bit before the lower ones. For example, in the crontab above, notice
577 that "daily" runs 10 minutes before "hourly". The main reason for this
578 is that the daily rotate will pull out the oldest hourly and make that
579 the youngest daily (which means that the next hourly rotate will not
580 need to delete the oldest hourly), which is more efficient. A
581 secondary reason is that it is harder to predict how long the lowest
582 backup level will take, since it needs to actually do an rsync of the
583 source as well as the rotate that all backups do.
584
585 If rsnapshot takes longer than 10 minutes to do the "daily" rotate
586 (which usually includes deleting the oldest daily snapshot), then you
587 should increase the time between the backup levels. Otherwise
588 (assuming you have set the lockfile parameter, as is recommended) your
589 hourly snapshot will fail sometimes because the daily still has the
590 lock.
591
592 Remember that these are just the times that the program runs. To set
593 the number of backups stored, set the retain numbers in
594 /etc/rsnapshot.conf
595
596 To check the disk space used by rsnapshot, you can call it with the
597 "du" argument.
598
599 For example:
600
601 rsnapshot du
602
603 This will show you exactly how much disk space is taken up in the
604 snapshot root. This feature requires the UNIX du command to be
605 installed on your system, for it to support the "-csh" command line
606 arguments, and to be in your path. You can also override your path
607 settings and the flags passed to du using the cmd_du and du_args
608 parameters.
609
610 It is also possible to pass a relative file path as a second argument,
611 to get a report on a particular file or subdirectory.
612
613 rsnapshot du localhost/home/
614
615 The GNU version of "du" is preferred. The BSD version works well also,
616 but does not support the -h flag (use -k instead, to see the totals in
617 kilobytes). Other versions of "du", such as Solaris, may not work at
618 all.
619
620 To check the differences between two directories, call rsnapshot with
621 the "diff" argument, followed by two backup levels or directory paths.
622
623 For example:
624
625 rsnapshot diff daily.0 daily.1
626
627 rsnapshot diff daily.0/localhost/etc daily.1/localhost/etc
628
629 rsnapshot diff /.snapshots/daily.0 /.snapshots/daily.1
630
631 This will call the rsnapshot-diff program, which will scan both
632 directories looking for differences (based on hard links).
633
634 rsnapshot sync
635
636 When sync_first is enabled, rsnapshot must first be called with the
637 sync argument, followed by the other usual cron entries. The sync
638 should happen as the lowest, most frequent backup level, and right
639 before. For example:
640
641 0 */4 * * * /usr/local/bin/rsnapshot sync &&
642 /usr/local/bin/rsnapshot hourly
643
644 50 23 * * * /usr/local/bin/rsnapshot daily
645
646 40 23 1,8,15,22 * * /usr/local/bin/rsnapshot weekly
647
648 30 23 1 * * /usr/local/bin/rsnapshot monthly
649
650 The sync operation simply runs rsync and all backup scripts. In
651 this scenario, all calls simply rotate directories, even the lowest
652 backup level.
653
654 rsnapshot sync [dest]
655
656 When sync_first is enabled, all sync behaviour happens during an
657 additional sync step (see above). When using the sync argument, it
658 is also possible to specify a backup point destination as an
659 optional parameter. If this is done, only backup points sharing
660 that destination path will be synced.
661
662 For example, let's say that example.com is a destination path
663 shared by one or more of your backup points.
664
665 rsnapshot sync example.com
666
667 This command will only sync the files that normally get backed up
668 into example.com. It will NOT get any other backup points with
669 slightly different values (like example.com/etc/, for example). In
670 order to sync example.com/etc, you would need to run rsnapshot
671 again, using example.com/etc as the optional parameter.
672
674 0 All operations completed successfully
675
676 1 A fatal error occurred
677
678 2 Some warnings occurred, but the backup still finished
679
681 /etc/rsnapshot.conf
682
684 rsync(1), ssh(1), logger(1), sshd(1), ssh-keygen(1), perl(1), cp(1),
685 du(1), crontab(1)
686
688 Use the -t flag to see what commands would have been executed. This
689 will show you the commands rsnapshot would try to run. There are a few
690 minor differences (for example, not showing an attempt to remove the
691 lockfile because it wasn't really created in the test), but should give
692 you a very good idea what will happen.
693
694 Using the -v, -V, and -D flags will print increasingly more information
695 to STDOUT.
696
697 Make sure you don't have spaces in the config file that you think are
698 actually tabs.
699
700 Much other weird behavior can probably be attributed to plain old file
701 system permissions and ssh authentication issues.
702
704 Please report bugs (and other comments) to the rsnapshot-discuss
705 mailing list:
706
707 http://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
708
710 Make sure your /etc/rsnapshot.conf file has all elements separated by
711 tabs. See /etc/rsnapshot.conf.default for a working example file.
712
713 Make sure you put a trailing slash on the end of all directory
714 references. If you don't, you may have extra directories created in
715 your snapshots. For more information on how the trailing slash is
716 handled, see the rsync(1) manpage.
717
718 Make sure to make the snapshot directory chmod 700 and owned by root
719 (assuming backups are made by the root user). If the snapshot directory
720 is readable by other users, they will be able to modify the snapshots
721 containing their files, thus destroying the integrity of the snapshots.
722
723 If you would like regular users to be able to restore their own
724 backups, there are a number of ways this can be accomplished. One such
725 scenario would be:
726
727 Set snapshot_root to /.private/.snapshots in /etc/rsnapshot.conf
728
729 Set the file permissions on these directories as follows:
730
731 drwx------ /.private
732
733 drwxr-xr-x /.private/.snapshots
734
735 Export the /.private/.snapshots directory over read-only NFS, a read-
736 only Samba share, etc.
737
738 See the rsnapshot HOWTO for more information on making backups
739 accessible to non-privileged users.
740
741 For ssh to work unattended through cron, you will probably want to use
742 public key logins. Create an ssh key with no passphrase for root, and
743 install the public key on each machine you want to backup. If you are
744 backing up system files from remote machines, this probably means
745 unattended root logins. Another possibility is to create a second user
746 on the machine just for backups. Give the user a different name such as
747 "rsnapshot", but keep the UID and GID set to 0, to give root
748 privileges. However, make logins more restrictive, either through ssh
749 configuration, or using an alternate shell.
750
751 BE CAREFUL! If the private key is obtained by an attacker, they will
752 have free run of all the systems involved. If you are unclear on how to
753 do this, see ssh(1), sshd(1), and ssh-keygen(1).
754
755 Backup scripts are run as the same user that rsnapshot is running as.
756 Typically this is root. Make sure that all of your backup scripts are
757 only writable by root, and that they don't call any other programs that
758 aren't owned by root. If you fail to do this, anyone who can write to
759 the backup script or any program it calls can fully take over the
760 machine. Of course, this is not a situation unique to rsnapshot.
761
762 By default, rsync transfers are done using the --numeric-ids option.
763 This means that user names and group names are ignored during
764 transfers, but the UID/GID information is kept intact. The assumption
765 is that the backups will be restored in the same environment they came
766 from. Without this option, restoring backups for multiple heterogeneous
767 servers would be unmanageable. If you are archiving snapshots with GNU
768 tar, you may want to use the --numeric-owner parameter. Also, keep a
769 copy of the archived system's /etc/passwd and /etc/group files handy
770 for the UID/GID to name mapping.
771
772 If you remove backup points in the config file, the previously archived
773 files under those points will permanently stay in the snapshots
774 directory unless you remove the files yourself. If you want to conserve
775 disk space, you will need to go into the <snapshot_root> directory and
776 manually remove the files from the smallest backup level's ".0"
777 directory.
778
779 For example, if you were previously backing up /home/ with a
780 destination of localhost/, and hourly is your smallest backup level,
781 you would need to do the following to reclaim that disk space:
782
783 rm -rf <snapshot_root>/hourly.0/localhost/home/
784
785 Please note that the other snapshots previously made of /home/ will
786 still be using that disk space, but since the files are flushed out of
787 hourly.0/, they will no longer be copied to the subsequent directories,
788 and will thus be removed in due time as the rotations happen.
789
791 Mike Rubel - http://www.mikerubel.org/computers/rsync_snapshots/
792
793 - Created the original shell scripts on which this project is based
794
795 Nathan Rosenquist (nathan@rsnapshot.org)
796
797 - Primary author and previous maintainer of rsnapshot.
798
799 David Cantrell (david@cantrell.org.uk)
800
801 - Current co-maintainer of rsnapshot
802 - Wrote the rsnapshot-diff utility
803 - Improved how use_lazy_deletes work so slow deletes don't screw up the
804 next backup at that backup level.
805
806 David Keegel <djk@cybersource.com.au>
807
808 - Co-maintainer, with responsibility for release management since 1.2.9
809 - Fixed race condition in lock file creation, improved error reporting
810 - Allowed remote ssh directory paths starting with "~/" as well as "/"
811 - Fixed a number of other bugs and buglets
812
813 Carl Wilhelm Soderstrom (chrome@real-time.com)
814
815 - Created the RPM .spec file which allowed the RPM package to be built,
816 among other things.
817
818 Ted Zlatanov (tzz@lifelogs.com)
819
820 - Added the one_fs feature, autoconf support, good advice, and much
821 more.
822
823 Ralf van Dooren (r.vdooren@snow.nl)
824
825 - Added and maintains the rsnapshot entry in the FreeBSD ports tree.
826
827 SlapAyoda
828
829 - Provided access to his computer museum for software testing.
830
831 Carl Boe (boe@demog.berkeley.edu)
832
833 - Found several subtle bugs and provided fixes for them.
834
835 Shane Leibling (shane@cryptio.net)
836
837 - Fixed a compatibility bug in utils/backup_smb_share.sh
838
839 Christoph Wegscheider (christoph.wegscheider@wegi.net)
840
841 - Added (and previously maintained) the Debian rsnapshot package.
842
843 Bharat Mediratta (bharat@menalto.com)
844
845 - Improved the exclusion rules to avoid backing up the snapshot root
846 (among other things).
847
848 Peter Palfrader (weasel@debian.org)
849
850 - Enhanced error reporting to include command line options.
851
852 Nicolas Kaiser (nikai@nikai.net)
853
854 - Fixed typos in program and man page
855
856 Chris Petersen - (http://www.forevermore.net/)
857
858 Added cwrsync permanent-share support
859
860 Robert Jackson (RobertJ@promedicalinc.com)
861
862 Added use_lazy_deletes feature
863
864 Justin Grote (justin@grote.name)
865
866 Improved rsync error reporting code
867
868 Anthony Ettinger (apwebdesign@yahoo.com)
869
870 Wrote the utils/mysqlbackup.pl script
871
872 Sherman Boyd
873
874 Wrote utils/random_file_verify.sh script
875
876 William Bear (bear@umn.edu)
877
878 Wrote the utils/rsnapreport.pl script (pretty summary of rsync
879 stats)
880
881 Eric Anderson (anderson@centtech.com)
882
883 Improvements to utils/rsnapreport.pl.
884
885 Alan Batie (alan@batie.org)
886
887 Bug fixes for include_conf
888
889 Dieter Bloms (dieter@bloms.de)
890
891 Multi-line configuration options
892
893 Henning Moll (newsScott@gmx.de)
894
895 stop_on_stale_lockfile
896
897 Ben Low (ben@bdlow.net)
898
899 Linux LVM snapshot support
900
902 Copyright (C) 2003-2005 Nathan Rosenquist
903
904 Portions Copyright (C) 2002-2007 Mike Rubel, Carl Wilhelm Soderstrom,
905 Ted Zlatanov, Carl Boe, Shane Liebling, Bharat Mediratta, Peter
906 Palfrader, Nicolas Kaiser, David Cantrell, Chris Petersen, Robert
907 Jackson, Justin Grote, David Keegel, Alan Batie, Dieter Bloms, Henning
908 Moll, Ben Low, Anthony Ettinger
909
910 This man page is distributed under the same license as rsnapshot: the
911 GPL (see below).
912
913 This program is free software; you can redistribute it and/or modify it
914 under the terms of the GNU General Public License as published by the
915 Free Software Foundation; either version 2 of the License, or (at your
916 option) any later version.
917
918 This program is distributed in the hope that it will be useful, but
919 WITHOUT ANY WARRANTY; without even the implied warranty of
920 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
921 General Public License for more details.
922
923 You should have received a copy of the GNU General Public License along
924 with this program; if not, write to the Free Software Foundation, Inc.,
925 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
926
928 Hey! The above document had some coding errors, which are explained
929 below:
930
931 Around line 6723:
932 You forgot a '=back' before '=head1'
933
934
935
936 2009-09-06 rsnapshot(1)