linux:system:backup-clone:rsync
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| linux:system:backup-clone:rsync [2023/09/08 10:37] – oscar | linux:system:backup-clone:rsync [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Rsync ====== | ||
| - | ===== Simple exact copy ===== | ||
| - | Including all permisions, time, etc. | ||
| - | rsync -az --verbose --itemize-changes --times --recursive --whole-file --delete --links root@192.168.178.80:/ | ||
| - | Notice the **'/' | ||
| - | |||
| - | ===== Output flags ===== | ||
| - | Each bit position and value in rsync' | ||
| - | < | ||
| - | YXcstpoguax | ||
| - | ||||||||||| | ||
| - | ||||||||||╰- x: The extended attribute information changed | ||
| - | |||||||||╰-- a: The ACL information changed | ||
| - | ||||||||╰--- u: The u slot is reserved for future use | ||
| - | |||||||╰---- g: Group is different | ||
| - | ||||||╰----- o: Owner is different | ||
| - | |||||╰------ p: Permission are different | ||
| - | ||||╰------- t: Modification time is different | ||
| - | |||╰-------- s: Size is different | ||
| - | ||╰--------- c: Different checksum (for regular files), or | ||
| - | || changed value (for symlinks, devices, and special files) | ||
| - | || | ||
| - | |╰---------- the file type: | ||
| - | | f: for a file, | ||
| - | | d: for a directory, | ||
| - | | L: for a symlink, | ||
| - | | D: for a device, | ||
| - | | S: for a special file (e.g. named sockets and fifos) | ||
| - | | | ||
| - | ╰----------- the type of update being done:: | ||
| - | <: file is being transferred to the remote host (sent) | ||
| - | >: file is being transferred to the local host (received) | ||
| - | c: local change/ | ||
| - | - the creation of a directory | ||
| - | - the changing of a symlink, | ||
| - | - etc. | ||
| - | h: the item is a hard link to another item (requires | ||
| - | --hard-links). | ||
| - | .: the item is not being updated (though it might have | ||
| - | attributes that are being modified) | ||
| - | *: means that the rest of the itemized-output area contains | ||
| - | a message (e.g. " | ||
| - | </ | ||
| - | **Some example output from rsync for various scenarios: | ||
| - | < | ||
| - | > | ||
| - | .f....og..x some/ | ||
| - | .f........x some/ | ||
| - | > | ||
| - | > | ||
| - | > | ||
| - | > | ||
| - | cd+++++++++ some/ | ||
| - | .d....og... some/ | ||
| - | .d..t...... some/ | ||
| - | </ | ||
| - | |||
| - | |||
| - | ====== Full backup ====== | ||
| - | |||
| - | < | ||
| - | rsync -haxAX --stats --delete --info=progress2 --info=name0 /* " | ||
| - | |||
| - | Some notable comments about parameters: | ||
| - | |||
| - | --stats gives information on files added, changed and deleted from the clone (called backup in your case). | ||
| - | --delete instructs rsync to delete files in the clone that no longer exist in the source directory. | ||
| - | info=progress2 gives a modern looking progress display whilst cloning directories. | ||
| - | --info=name0 prevents every single filename from being displayed as it is being copied. This gives less screen clutter but you may want to omit this parameter. | ||
| - | /* tells rsync where to start synchronizing files. In this example it's the root directory but you want to change it to / | ||
| - | " | ||
| - | The second line starting with --exclude={/ | ||
| - | |||
| - | </ | ||
| - | As with all backup scenarios always test the backups to make sure all files are there and contain the appropriate information. | ||
linux/system/backup-clone/rsync.1694169476.txt.gz · Last modified: by oscar
