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.