rsync Errors — Permission Denied, Connection Failed, and Partial Transfer Fixes
Warningcommand
Overview
Fix rsync errors including permission denied, connection refused, partial transfer, and SSH authentication failures during file synchronization.
Key Details
- rsync synchronizes files between local and remote systems efficiently using delta encoding
- Remote rsync uses SSH by default — SSH authentication must be configured
- Permission issues are common when syncing as root vs normal user or across different systems
- The --delete flag removes files from destination that do not exist in source — use with caution
- Partial transfers can be resumed with --partial and --append-verify flags
Common Causes
- SSH key authentication not configured for the remote server
- File permissions or ownership differing between source and destination systems
- Disk space exhaustion on the destination causing partial transfer
- Network interruption during large file transfer
Steps
- 1Test SSH first: 'ssh user@remote-host' to verify authentication works before using rsync
- 2Preserve permissions: 'rsync -avz --no-perms --no-owner --no-group source/ user@host:dest/'
- 3Resume interrupted transfer: 'rsync -avz --partial --progress source/ user@host:dest/'
- 4Dry run first: 'rsync -avzn --delete source/ dest/' — the -n flag shows what would happen without doing it
- 5For large transfers: use --bwlimit=1000 to limit bandwidth to 1000 KB/s and avoid saturating the network
Tags
rsyncsynctransfersshbackup
More in Command
linux-exit-code-127Linux Exit Code 127 — Command Not Found
Warninglinux-exit-code-126Linux Exit Code 126 — Permission Denied
Warninglinux-segmentation-faultLinux Segmentation Fault (Signal 11)
Errorlinux-killed-signal-9Linux Process Killed (Signal 9)
Errorlinux-ansible-playbook-errorsAnsible Playbook Errors — Task Failures, SSH Connectivity, and Variable Resolution Issues
Warninglinux-terraform-errorsTerraform Errors — Plan, Apply, and State Management Failures
WarningFrequently Asked Questions
-a is archive mode (preserves permissions, timestamps, symlinks, recursion). -v is verbose output. -z enables compression during transfer. This is the most common rsync flag combination.