rsync

rsync -auhv --delete --force --size-only --progress -n {SRC} {DST}
  • -a: Archive (same as -rlptgoD, no -A,-X,-U,-N,-H)
  • -r: Recursive
  • -l: Copy symlinks as symlinks
  • -p: Preserve permissions
  • -t: Preserve modification times
  • -g: Preserve group
  • -o: Preserve owner (super-user only)
  • -D: Preserve device files (super-user only) and preserve special files
  • -u: Skip files that are newer on the receiver
  • -h: Output numbers in a human-readable format
  • -v: Increase verbosity
  • --delete: Delete extraneous files from dest dirs
  • --force: Force deletion of dirs even if not empty
  • --progress: Show progress during transfer
  • -n: Dry-run (list only, nothing is changed)
  • -e 'ssh -p 22': Use ssh on port 22
  • --partial: Preserve partially uploaded files
  • -P: Combines --partial and --progress
  • --append: Continues partial uploaded files

Omit the -n dry-run flag if everything seem in order.

The source {SRC} and destination {DST}must end with a / if they are directories, otherwise the source folder is created within the target.

Sync via ssh

Make sure rsync is installed on both systems.

rsync -avP --append -e 'ssh -p 22' /src/ username@server:/dst

This page was last edited on 2026-02-10 11:28

Powered by Wiki|Docs

This page was last edited on 2026-02-10 11:28

Bjørn Singer
Private wiki!

Powered by Wiki|Docs