LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Duplicity using scp vs. rsync (https://www.linuxquestions.org/questions/linux-software-2/duplicity-using-scp-vs-rsync-4175480087/)

ziphem 10-08-2013 06:49 PM

Duplicity using scp vs. rsync
 
I'm hoping for some confirmation/explanation regarding use of scp vs. rsync in duplicity; I've read a couple of sources, but maybe it's just not 2x4 clear enough for me!

If I'm looking to do a regular sync of my important files, backing them up to another location, there's no real advantage of using rsync over scp in duplicity - and rather, could be seen as less desirable? Because, how I understand it, if I specify scp, and then I want to restore the files at some point, I will have the option to restore from the latest state of files back, or from as far back as I have specified Duplicity should keep.

The scp incrimental backups will indicate the "proper" current state; by that, I meant that a restoration of the most recent backup will not restore all the files from time immemorial, but only those which are current as per the most recent incrimental backup.

Rsync, by comparison, will only keep the latest set of files, acting as a pure rsync --delete. As such, no history will be available.

Am I correct in this, or am I completely confused?

duplicity incremental --ssh-options="-oIdentityFile=[key]" --encrypt-key [key] --exclude /home/path/VeryImportantDocs/notimportant /home/path/VeryImportantDocs/ scp://user@ip:[port]/VeryImportantDocsBak

vs

duplicity incremental --ssh-options="-oIdentityFile=[key]" --encrypt-key [key] --exclude /home/path/VeryImportantDocs/notimportant /home/path/VeryImportantDocs/ rsync://user@ip:[port]/VeryImportantDocsBak

Thanks!!

sundialsvcs 10-10-2013 08:41 AM

Well, I don't use duplicity, but here's the difference between "scp" and "rsync."

"scp" is just a secure version of "cp = copy." It copies files from one place to another. Fairly dumb.

"rsync" (which has nothing at all to do with "sync") is a synchronizer, which among other things examines the target files to see if they need to be replaced, compresses the data during transfer across the wire, and so on. It basically tries to be sure that "the content of this directory is synchronized with the content of that directory," and to do it in an efficient way.

ziphem 10-10-2013 11:10 AM

Hi, thanks for the response. I am aware of the difference between the two, which is why I wasn't sure if specifying either SCP or rsync in duplicity had the same effect as using either on their own. I currently use rsync over SSH for all my network backups, which I store in a TrueCrypt folder. I unlock and mount the TrueCrypt remotely through SSH; even though I use HISTCONTROL=ignorespace and send the unlock command plus password with a space, I read somewhere that the bash commands could be stored elsewhere. It doesn't really matter that I have my Truecrypt password stored plaintext somewhere on my local (backed up) computer though, since it's in the same location as the files I'm backing up. But I figured that duplicity was a little more appropriate for this task, and maybe more secure in other manners that I'm not familiar with...?

Thanks.


All times are GMT -5. The time now is 01:49 AM.