stsync(1)
Synchronize files and directories between local and remote systems using the Secure Technology Stack protocol.
Synopsis
stsync [OPTION]... SOURCE DESTINATIONDescription
stsync is a secure file synchronization utility that transfers files and directory structures between local and remote systems. It provides encrypted transport, bandwidth throttling, and intelligent change detection to efficiently synchronize only modified content.
The command supports one-way and two-way synchronization modes, with options for deletion, compression, and atomic transfers. Remote paths use SSH-style syntax: user@host:path.
Common options
| Flag | What it does |
|---|---|
-r, --recursive | recursively synchronize directories and subdirectories |
-a, --archive | archive mode; preserves permissions, timestamps, and symbolic links |
-v, --verbose | increase verbosity; show transferred files and progress |
--delete | delete files on destination that no longer exist on source |
-z, --compress | compress file data during transfer to save bandwidth |
-e, --exclude=PATTERN | exclude files matching PATTERN from synchronization |
--bwlimit=KBPS | limit bandwidth usage to specified kilobytes per second |
--checksum | skip files based on checksum rather than modification time |
-n, --dry-run | show what would be transferred without actually copying files |
--timeout=SECONDS | set connection timeout for remote transfers |
--atomic | write to temporary file and move atomically on completion |
-p, --progress | show progress bar for each file transfer |
Examples
recursively synchronize local documents directory to remote backup location with verbose output
stsync -r -v /home/user/documents [email protected]:/backup/docsarchive mode sync with deletion and compression; useful for keeping local mirror in sync
stsync -a --delete -z source/ dest/synchronize project directory excluding temporary and git files to remote server
stsync -r --exclude='*.tmp' --exclude='.git' /project user@server:/backups/projectdry-run of syncing large data with 1MB/s bandwidth limit to show what would transfer
stsync -r -n --bwlimit=1024 /large/data backup@nas:/mnt/storagesynchronize based on file checksums with atomic writes for data integrity
stsync --checksum --atomic /source /destinationpull backup from remote server to current directory with 30-second timeout
stsync -r -v --timeout=30 user@remote:/home/user/backup .archive-mode sync of web directory to remote server with progress and deletion of old files
stsync -a -p --delete /var/www user@webserver:/var/www