I have a file server that files get dumped on through-out the day. They can be any size, any type, etc. I then want to sync those files down to a remote backup server but the trick is once they're on the backup server they get renamed and moved so a simple rsync won't work.
Currently I keep track of what files I've downloaded by running an ls on the dir and saving that locally after I sync them. Then when I run the job again I rsync files by excluded the files in that list. This works for the most part but sometimes a file with have an odd character and the re-downloads. Also, if for some reason the network flakes out and the "ls" fails next time it will try and re-download everything because the exclude list is empty.
Is there a better way to do this?