I know rsync is a powerful tool.
Can someone please tell me what settings I need to achive the following task.
- the remote server is a linux box with ssh/rsync access
- The original data lives on a remote server and should be transfered to a local computer
- On the remote server, I have a directory with subdirectories and many small files to transfer
- in the top directory, directories and files are created / changed / deleted
- every day I start an rsync task to sync with the remote server
- new files should be created locally
- changed files should be synced
- deleted files should be preserved
- if I delete a file locally that still exists on the remote server it should be created again
- if I modify a file locally that still exists on the remote server, it should be overwritten
so basically the remote server is the master and readonly.
I want to preserve a local copy of all files that live on the server.
But if a file is deleted on the server, I still want to keep the file as a local copy for archive purpose.