1

I'm using duplicity to save encrypted backups to remote machine A once per day. I'd like remote machine B to download those backups from remote machine A, but only the new archives so that if A is compromised and the backups are tampered with, B will still have clean backups up to that point.

duplicity first saves a series of files like this:

duplicity-full.20140330T145552Z.manifest.gpg
duplicity-full.20140330T145552Z.vol1.difftar.gpg
duplicity-full.20140330T145552Z.vol2.difftar.gpg
duplicity-full-signatures.20140330T145552Z.sigtar.gpg

Subsequent backup operations save a series of files like this:

duplicity-inc.20140330T145837Z.to.20140330T145933Z.manifest.gpg
duplicity-inc.20140330T145837Z.to.20140330T145933Z.vol1.difftar.gpg
duplicity-new-signatures.20140330T145837Z.to.20140330T145933Z.sigtar.gpg

In a bash script, how can I have machine B download only the files it doesn't have yet and not alter the ones it does have?

stackoverflowrocks
  • 717
  • 1
  • 6
  • 11

1 Answers1

0

You can use rsync to sync the backup folders between A and B and make use of its --ignore-existing option to skip files that already exist on machine B:

--ignore-existing

  skip updating files that exist on receiver
Adrian Frühwirth
  • 42,970
  • 10
  • 60
  • 71