Getting rsync to move file from source to destination ?
Posted
by fabien-barbier
on Server Fault
See other posts from Server Fault
or by fabien-barbier
Published on 2010-06-02T22:20:25Z
Indexed on
2010/06/02
22:26 UTC
Read the original article
Hit count: 328
Is rsync is a good choice for my project ?
I have to :
- copy files from source to destination folder via SSH,
- be sure all files are copied,
- delete source files after copy.
- if I have conflict name, I have to rename files.
It looks like I can use option : --remove-source-files (to delete source files)
But how rsync manage conflict, can I had rules ?
Use case on my project :
I run scientific calculation on server A and results are inserted in folder "process", for each calculation I have a repository like this : /process/calc1.
Now I would like to transfer repository "/calc1" to server B (I get /process/calc1), and delete "calc1" from server A.
...During another calculation I get "/process/calc2" on server A, the idea is also to move "calc2" in "/process/" directory on server B, then I have now on server B :
- /process/calc1
- /process/calc2
(and /process/ on server A is empty).
How rsync will manage conflict (on server B) if I have another folder like "/process/calc1" in server A after a new calculation (if "/process/calc1" already exist on server B) ?
Is it possible to add rules with rsync, and rename "/process/calc1" by "process/calc1R2" in server B ? And so on (ex:calc1R3) ?
Thanks.
© Server Fault or respective owner