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

see also

  • Make Your Own Backup System – Part 1: Strategy Before Scripts / Part 2 - The Backup Plan: Asking the Right Questions
    • How much risk am I willing to take?
      • A common but risky approach is to store a backup on the same machine that requires backing up.
      • Thus, the initial step is to establish a management plan, balancing security and cost. The safest backup is often the one stored farthest from the source machine. However, this approach introduces challenges related to space and bandwidth
    • What data do I need to protect?
      • The Core Decision: Full Disk vs. Individual Files
      • The Key to Consistency: The Power of Snapshots
      • The Architecture: Push or Pull?
    • What downtime can I tolerate in case of data loss?
    • What type and amount of storage space do I have available?
Written on April 28, 2019, Last update on June 24, 2024
rsync backup file