Backup Day - rsync

sometime early on Friday, the server this blog is hosted on suffered catastrophic data loss. - International Backup Awareness Day

see also

  • Do not trust your storage, at all. Fault tolerance, backups, and power protection suitable for the importance of the data… - HN
  • How does rsync work?

Rsync / man

  • –dry-run - test command without any impact
  • -a - archive mode; equals -rlptgoD - preserve ownership and permissions
    • -r - recursive copy
    • -l, –links - symlink are copied with their initial definition (no rellocation)
    • -p, –perms - preserve permissions
    • -t, –times - preserve modification times
    • -g, –group - preserve group
    • -o, –owner - preserve owner (super-user only)
    • -D - preserve special files & preserve device files
  • -v - verbose mode
  • -P - progress mode

  • –partial - keep partially transfered file to avoid relaoding them entirely next time.
  • –delete - delete files in DEST directory not present in SRC directory.

  • -h - human-readable, output numbers in a human-readable format.
  • –remove-source-files - remove source after backup complete

  • -L, –copy-links - copy the link target, rather than the symlink.
  • -H, –hard-links - link together the corresponding files on the receiving side.
time rsync -ravP /source /backup/

Tools

Written on April 28, 2019, Last update on June 24, 2024
rsync backup file