#rsync
9 one-liners with this tag.
All one-liners tagged rsync
Copy a directory locally with all permissions and attributes
#rsync -aHAX --info=progress2 /var/www/vhosts/ /mnt/newdisk/vhosts/
Incremental backup with hard links using rsync --link-dest
#rsync -a --link-dest=/backup/example.com/aktuell /var/www/vhosts/example.com/httpdocs/ /backup/example.com/$(date +%F)/ && ln -sfn /backup/example.com/$(date +%F) /backup/example.com/aktuell
Mirror a directory exactly with rsync --delete
$rsync -av --delete /var/www/vhosts/example.com/httpdocs/ /backup/example.com/httpdocs/
Resume an interrupted transfer of large files
$rsync -avP /var/backups/example.com-2026-10-09.tar.gz webuser@backup.example.com:/home/webuser/backup/
rsync with excluded directories and files
$rsync -av --exclude='wp-content/cache/' --exclude='*.log' /var/www/vhosts/example.com/httpdocs/ /backup/example.com/httpdocs/
Run rsync with limited bandwidth
$rsync -avz --bwlimit=5000 /var/www/vhosts/example.com/httpdocs/ webuser@backup.example.com:/home/webuser/backup/httpdocs/
Test rsync with a dry run
$rsync -av --dry-run /var/www/vhosts/example.com/httpdocs/ /backup/example.com/httpdocs/
Transfer files to another server with rsync over SSH
$rsync -avz -e 'ssh -p 22' /var/www/vhosts/example.com/httpdocs/ webuser@backup.example.com:/home/webuser/backup/httpdocs/
Verify a backup against the original using checksums
$rsync -rcn --itemize-changes /var/www/vhosts/example.com/httpdocs/ /backup/example.com/httpdocs/