published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted in category Systems Software / File Manipulation
posted at 24. Aug '21
Howto Rsync Synchronize (Copy) Directories
recursive, preserve modification times, verbose. Use --delete
to delete files on destination. BE VERY CAREFUL WITH SLASHES ON SOURCE DIRECTORY, CAN DELETE UNEXPECTED FILES. On destination doesn’t matter (or was it vice versa?).
rsync -rtv source/ destination/ - content of source, like source/*
rsync -rtv source destination/ - copies whole source
Synchronize through SSH:
rsync --rsh='ssh' source/ #{user}@#{host}:uploaded --verbose --recursive --delete --compress --progress
Add Comment