GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing computingforgeeks.com — rsync Command on Linux - Usage with Examples [Guide] rsync is the standard file synchronization tool on Linux and Unix systems. It transfers only the differences between source and destination files (delta-transfer algorithm), making it faster than copying everything with Install rsyncrsync is pre-installed on most Linux distributions. If missing, install it:
Verify the installed version:
Basic Syntax
Common rsync Options
The most common combination is The Trailing Slash RuleThe trailing slash on the source path changes rsync behavior significantly. This is one of the most common sources of confusion:
The destination path is not affected by trailing slashes – only the source matters. Local Sync ExamplesCopy a single file to another directory:
Sync the contents of one directory to another with progress:
Show overall transfer progress instead of per-file:
Remote Sync over SSHrsync uses SSH as its default transport. Push local files to a remote server:
Pull files from a remote server to local:
Rsync with Custom SSH PortIf the remote server runs SSH on a non-standard port, use the
Rsync with a Specific SSH Key
Dry Run – Test Before SyncingAlways test with
Review the output carefully. Lines prefixed with Mirror with –deleteThe
This is the standard approach for deploying websites and keeping backup mirrors in sync. Always do a Exclude and Include PatternsSkip specific files or directories during transfer:
For complex exclude rules, use a file:
Add one pattern per line:
Then reference the file:
Limit Transfer by File SizeSkip files that are larger or smaller than a threshold:
Bandwidth LimitingPrevent rsync from saturating the network link during production hours:
The value is in KB/s. Use Resume Partial TransfersIf a large transfer gets interrupted, the
Without Backup with VersioningThe
This keeps Scheduled Backups with CronAutomate rsync by adding it to cron. Open the crontab editor:
Add a job to run daily at 2 AM:
For more sophisticated backup automation, see our guide on bash scripts for automating Linux backups. For real-time sync, check rsync with lsyncd for live file synchronization. Quick Reference
Conclusionrsync is the go-to tool for file synchronization, backups, and deployments on Linux. The delta-transfer algorithm means only changed bytes are sent over the network, making it far more efficient than scp for recurring transfers. For production use, always test with Related guides:
Kibet John
The power of technology can be blatantly perceived by everyone in the world today and its sway did not spare me. Kibet is a tech enthusiast, ComputingforGeeks writer, and an ardent lover of knowledge and new skills that make the world brighter. His interests lie in Storage systems, High Availability, Routing and Switching, Automation, Monitoring, and Arts. Keep reading
Security
UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04
Php
PHP2Shell (CVE-2026-109618, CVE-2026-109619): Check and Patch PHP
AI
Claude Code Cheat Sheet: Commands, Shortcuts and Flags (PDF)
Security
Apache CVE-2026-119618: Check and Patch mod_http2 on Linux
Security
Patch Apache CVE-2026-119618 on RHEL, Rocky Linux and AlmaLinux
Security
Setup Secure FTP Server(SFTP) with WebDAV using SFTPGo
Leave a Comment Cancel reply
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |