1

Please forgive my ignorance, I have searched for an answer but have so far come up blank.

Here's what I want to do:

Use rsync to backup from the fileserver (Ubuntu Server 14.04) to a NAS device. When this backup is complete then run rsync again to a remote server via SSH.

I have a nagging feeling that this won't work properly - something to do with how rsync marks files as already backed up and not changed since last backup.

Am I right to be suspect that this might cause a problem?

Thanks,

Simon.

  • 1
    I don't think so. rsync compares the target location and the source location, not the source location with itself. Otherwise how would those who mirror repositories using rsync be able to do so? – muru Dec 4 '14 at 13:19
  • Thanks muru ... that's the sort of reassurance I wanted before starting out - it will take a long time to test once I've written the necessaries so if I was on the wrong track then I'm sure someone would have let me know. – Simon Dec 4 '14 at 15:30
  • @muru: please convert your comment to an answer so that people like me who go hunting for unanswered questions find them answered in the comments... :-) – Fabby Dec 4 '14 at 22:35
  • 1
    @Fabby I suspect OP would like it tested, and I am too lazy to do that. If you can run a small test on rsync's behaviour, please feel free to post an answer. – muru Dec 5 '14 at 3:38
1

From the man page:

DESCRIPTION
   It [rsync] offers a  large  number  of  options
   that  control  every  aspect  of  its behavior and permit very flexible
   specification of the set of files to be copied.  It is famous  for  its
   delta-transfer  algorithm,  which  reduces the amount of data sent over
   the network by sending only the differences between  the  source  files
   and  the  existing  files in the destination.

Out-of-the box, without any special parameters, rsync will do exactly as you need:

  • sync all differences to the NAS and sync all differences to the remote SSH server.
  • The first time you run it, it will create a full copy on both, and then sync the 2 independently.

Even when the connection to the remote server is dropped, it will just continue where it left off next time it's invoked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.