I'd like to download new (defined as file names that have not been seen before) and also updated (defined as file names that have been seen before, but with newer timestamps) files. However, I would like the updates to NOT overwrite existing copies. Files that are neither new nor changed should not be transferred again.
In other words, I'd like to keep version histories.
So if foo.txt exists in both local and remote, but remote has changed, then I would like to transfer foo.txt but have it renamed to foo.001.txt (or anything unique that connotes the version). The next time I connect and find that foo.txt has been updated again, it should be transferred down, but now as foo.002.txt.
Does anyone have a script that can help here?
Many thanks.