BackupPC-users

Re: [BackupPC-users] How does BackupPC rsync over ssh work?

2011-09-26 09:40:02
Subject: Re: [BackupPC-users] How does BackupPC rsync over ssh work?
From: Maarten te Paske <maarten AT tepaske DOT net>
To: backuppc-users AT lists.sourceforge DOT net
Date: Mon, 26 Sep 2011 15:37:46 +0200
On Mon, Sep 26, 2011 at 09:00:03AM -0400, Jeffrey J. Kosowsky wrote:

> maarten AT tepaske DOT net wrote at about 10:29:16 +0200 on Monday, September 
> 26, 2011 > So I am currently writing some scripts for my backup needs. Which 
> made
>  > me wonder, BackupPC essentially starts a backup like this:
>  > 
>  > /usr/bin/ssh -4 -q -l backuppc <host> sudo /usr/bin/rsync --server 
> --sender --numeric-ids --perms --owner --group -D --links --hard-links 
> --times --block-size=2048 --recursive . <directory>
>  > 
>  > But how does this really work? I understand rsync starts in server mode
>  > on the host that is to be backed up, but I don't see a rsync process
>  > being started on the BackupPC server.
> 
> Well remember that BackupPC uses it's own perl-based client version of
> rsync 'perl-File-RsyncP' which implements a subset of rsync
> functionality and interfaces with the rsync client.
> 
> The line you quote above ssh's into the remote client and starts up a
> rsync process there. But of course that ssh line doesn't start the
> local rsync process that you need to communicate with the remote
> process.

Thanks, that explains a lot!
 
> If you are trying to run rsync standalone over ssh without using
> BackupPC, then you should invoke rsync over ssh the *normal* way which
> starts up the process locally and then uses ssh to start the remote
> rsync process.
> 
> Specifically, if you want all the same flags as BackupPC uses, try
> something like:
> 
> sudo /usr/bin/rsync --numeric-ids --perms --owner --group -D --links
> --hard-links --times --block-size=2048 --recursive  
> <backuppc>@<host>:<directory> .

OK, I will read a bit more into the rsync documentation. I thought this
way I wouldn't be able to limit the privileges through sudo, but maybe
I'm wrong.

> But this is really just standard rsync usage. Also, manually setting
> the block-size doesn't make sense if not using BackupPC (where it's
> set that way for checksum caching and actually ignored) since the
> automatic default setting will generally be more efficient. There may
> be other options you want to add or delete.
> 
> But this has nothing really to do with BackupPC...

Still it's good to know.

Thanks for the elaborate anwer!

Maarten

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/