How to use it without tossing files everywhere
- Pretty good tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps
Important options
-a
archive, use this if recursive + 'preserves symbolic links, special and device files, modification times, group, owner, and permissions'-n
Dry run - don't do anything--delete
Delete files that aren't in source-t
Preserve modification times (I think?)-v
Increase verbosity-q
Suppress non-error messages-P
Keep partially transfered, and show progress. When I use this, I don't think-v
helps?-h
Human readable-z
Compress - use for text files maybe?--exclude=
Exclude based on pattern (comma separated list)--include=
Include based on pattern (comma separated list)
file structure
- a
> - thing.txt
- b
- a
> - thing.txt
- b
- a
> - thing.txt
- a
> - thing.txt
- b
- a
> - thing.txt
- a
> - thing.txt
- b
> - thing.txt
- a
> - thing.txt
- b
> - thing.txt
- a
> - thing.txt
- b
> - thing.txt
>>>Before
- a
> - thing.txt
- b
- a
> - hi.txt
=========
- a
> - thing.txt
- b
- a
> - hi.txt
> - thing.txt
<<<After