Skip to main content

Archive & Transfer Modes

What -a Does

-a (archive) is shorthand for 7 flags combined:

FlagPurpose
-rRecurse into directories
-lCopy symlinks as symlinks
-pPreserve permissions
-tPreserve modification times
-gPreserve group
-oPreserve owner (root only)
-DPreserve device + special files
# These are equivalent:
rsync -a src/ dest/
rsync -rlptgoD src/ dest/

Transfer Mode Flags

FlagEffectBest For
-vVerbose outputDebugging
-zCompress during transferRemote/slow networks
-PProgress + partial (resume)Large files
-hHuman-readable sizesReadability
-nDry run (no changes)Testing
--statsShow transfer statisticsAuditing
-cChecksum-based comparisonCritical data
-uSkip newer files on destMerge syncs
-WWhole file (skip delta)LAN/local
--appendAppend to partial filesLogs, growing files
--inplaceUpdate files in placeLarge DB dumps