Quick Linux Tip #03: How do I backup files fast, only copying changes?

Quick Linux Tip #3:

Try: rsync -avz --delete /source/ /destination/

Info: rsync only transfers changed files, making backups much faster. -a means archive, -v means verbose, and -z enables compression.

Examples:

  • $ rsync -avz /home/user/ /mnt/backup/
  • $ rsync -avz --delete remote:/data/ /local/backup/
  • $ rsync -avz --exclude='*.tmp' /src/ /dst/

Note: Use --dry-run first. A trailing slash (/source/) copies contents; omitting it (/source) copies the folder itself.




LinuxTeck.com
linuxteck@ubuntu:~$ rsync -avz --delete /source/ /destination/

linuxteck@ubuntu:~$

About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.

L