When using rsync sometimes the rsync doesn't copy all the files done, below is my code I use. Is they a way to do a checksum or check after the rsync to see if all the files have been copied and if not try again until all files have been copied?
TEMP="/home/user/temp"
OPTS="-rav -h"
rsync $OPTS --stats [email protected]:/home/user/Local $TEMP
I think this is best solved by configuring rsync
properly. Read the man
page :) there's options (like --checksum
for this).
You can do this on your own as well:
find
all files in the rsync'd directory.xargs md5sum
to get a checksum for all filesmd5sum
the checksumsIf you do that on both sides (local/remote), you'll have a a checksum to compare against.