# Backups That Work: rsync

rsync -a copies a folder and, every time after the first, only the files that changed; a slash at the end of the source means "what's inside"; --delete makes the backup a mirror, so rehearse it with -n first; and a backup counts only once you've restored from it and compared the result with diff -r.

![Cheat sheet for the lesson Backups That Work: rsync: rsync -a copies a folder and, every time after the first, only the files that changed; a slash at the end of the source means "what's inside"; --delete makes the backup a mirror, so rehearse it with -n first; and a backup counts only once you've…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/9c178d49ca774a41ac05aa2856acc33e.webp)

- Category: Bash
- Level: Journeyman
- Tags: backup, diff, dry-run, linux, rsync, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-rsync-cheat-sheet
