↑ ↓ select, Enter open, Esc close

Verify a backup against the original using checksums

Adjust the values, the command updates live
user@server
rsync -rcn --itemize-changes /var/www/vhosts/example.com/httpdocs/ /backup/example.com/httpdocs/

-c compares every file by checksum instead of size and timestamp, and -n makes sure nothing is transferred. Only files that differ in content (line starts with >fc) or are missing at the destination (>f+++++++++) are listed. If the output is empty, source and backup match in content. The destination can also be a remote path such as BENUTZER@HOST:PFAD/.

Note: All files are read completely on both sides, which takes a while for large amounts of data.

Also searched as

  • verify backup is complete
  • compare backup with original
  • rsync checksum compare
  • compare file contents over ssh

Related one-liners

All in rsync and backup

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.