I am working on an rsync
script for directory replication. I have it syncing only new and modified files or directories but am not liking the fact that its copying renamed files or directories as a new file or directory, keeping the files not in sync. I have also set a bandwidth limit of 1MB since this will run during business work hours. Here’s my script:
rsync -zvru --bwlimit=1024 /mymounts/test1/ /mymounts/test2
How can I keep files and directories in sync if someone renames something, with still only copying new or modified files? Here are the files in question
ls "/mymounts/test1/some stuff"
new directory newfile1.txt newfile3.txt renamedFile.txt
ls "/mymounts/test2/some stuff"
new directory newfile1.txt newfile2.txt newfile3.txt renamedFile.txt
Or would there be a way to even move the renamed files to another directory say:
/mymounts/VerControl
?
--bwlimit=1024
is not one MB, it's one MiB/s ;-)