Utility of --backup

Charles c at charlesmatkinson.org
Mon Jul 19 12:26:59 UTC 2021


IThe --backup option is great for creating "rolling full" backups which 
look exactly like the backed up tree except for the existence of the 
backup directory

Here's how a Linux backup directory tree looks as created by backup 
utility bung's bu_rsync script

+-- bin -> usr/bin
+-- boot
|   +-- grub
+-- _Changed and deleted files
|   +-- 2021
|       +-- Jul
|       |   +-- 01 at 17:45
|       |   |   +-- opt
|       |   |   |   +-- tomcat
|       |   |   +-- root
|       |   |   +-- var
|       |   |       +-- backups
|       |   |       +-- cache
|       |   |       +-- lib
|       |   |       +-- local
|       |   |       +-- log
|       |   |       +-- mail
|       |   |       +-- spool
...
|       |   +-- 17 at 17:46
...
|       |   +-- 18 at 17:45
...
|       +-- Jun
...
|           +-- 29 at 17:45
...
|           +-- 30 at 17:45
...
+-- dev
+-- etc
...

A "rolling full" backup is great to restore from for small organisations 
which do not do enough restores to be well practised because the backup 
looks exactly like the source except for the additional "_Changed and 
deleted files" directory.

Perfect point in time restores are not possible but adequate 
approximations (point in time but with the possibility of some extra 
files) can be done by restoring the last backup and then each of the 
changed and deleted files sets until the latest set after the desired 
point in time

On 19/07/2021 17:30, rsync-request at lists.samba.org wrote:
> I would like some feedback about the --backup option in rsync. Is
> it worth using it for backups, or should I just use rsync
> commands that just transfer files without the use of --backup
> option?
> 
> -b, --backup      make backups (see --suffix & --backup-dir)
> --backup-dir=DIR  make backups into hierarchy based in DIR
> --suffix=SUFFIX   backup suffix (default ~ w/o --backup-dir)
> 
> I am somewhat hesitant to use it because with the backup option,
> preexisting destination files are renamed as each file is
> transferred or deleted. It also says that previously backed-up
> files could get deleted.  Thusly I need some assistance
> understanding all the pros and cons.



More information about the rsync mailing list