I use the following command to verify which files will be copied to the external HDD:
rsync -cnrv --exclude-from=~/sync/exclude_patterns.txt /<source_folder>/ /<dest_folder>/
And once I am ok with the list, I run the command without the "-n" option as:
rsync -crv --exclude-from=~/sync/exclude_patterns.txt /<source_folder>/ /<dest_folder>/
Explanation of Options:
- -c: Use checksum, ot modification date & time to compare files
- -n: Dry Run - perform a trial run without any changes
- -r: Recurse into sub-directories
- -v: Verbose - give detailed output
- --exclude-from: Use the file patterns given in the file to exclude files from source
- trailing / in paths: Do not create the current folder - copy it's contents
There are many other options - checkout the man page for other great features of rsync.
No comments:
Post a Comment