Test rsync with dry runs before executing to avoid losing data
With the power of rsync, it’s quite easy to accidentally erase, overwrite, or otherwise destroy your data with one slip of the keys.
Before you even think of attempting anything complicated like deleting extraneous files on the destination, handling file systems that don’t support permissions such as FAT32 with -lrt, do a dry run barrel roll.
If you’re doing something other than non-trivial copies or using features of rsync that you’ve never used before, add the -n switch to whatever you’re doing to make it a dry run.
123 rsync -avhn /orig/src /home/user/dest/rsync -nbrvvhn --del --bwlimit=1000 /orig/src/ /home/user/dest/rsync -rn --size-only --exclude=*.iso /orig/src/ /home/user/dest/
Even if you supply the right switches, you might leave off a slash or put one where it doesn’t belong. Better safe than sorry, especially when you’re about to churn through terabytes of data at a time.
1234567891011121314151617181920212223 building file list ... donedeleting file_1deleting file_2deleting file_3...deleting file_79292deleting file_79293deleting file_79294./Number of files: 1Number of files transferred: 0Total file size: 0 bytesTotal transferred file size: 0 bytesLiteral data: 0 bytesMatched data: 0 bytesFile list size: 28File list generation time: 0.001 secondsFile list transfer time: 0.000 secondsTotal bytes sent: 44Total bytes received: 20sent 44 bytes received 20 bytes 128.00 bytes/sectotal size is 0 speedup is 0.00