BackupPC-users

Re: [BackupPC-users] Initiate backup from client?

2009-11-11 19:15:34
Subject: Re: [BackupPC-users] Initiate backup from client?
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 11 Nov 2009 19:11:28 -0500
Peter Walter wrote at about 17:22:39 -0500 on Wednesday, November 11, 2009:
 > Meel Me wrote:
 > > Hello,
 > >
 > > I want to know if it's possible to initiate a backup from the client 
 > > machine, in a way that the clients connects to the backuppc server 
 > > over the internet to start the backup?
 > >
 > > *My (desired) situation*
 > > I've got a laptop. I'm abroad for many months once and a while. While 
 > > I'm abroad I want to be able to backup my laptop regularly and to 
 > > restore the data on my laptop if it crashes (or gets stolen).
 > >
 > > I want to place my backuppc server in a total other region than my 
 > > home is. So that a disaster like heavy earthquake, explosion, etc. 
 > > will never effect and my backuppc server and my laptop at once.
 > > The location where I can place my backuppc server is not in my local 
 > > area network. The backuppc server will only be available through the 
 > > internet.
 > >
 > >
 > > *Question*
 > > I've read the documentation of backuppc. There are several methods for 
 > > backing up laptops (smb, rsync, rsyncd, tar). All methods are 
 > > initiated from the backuppc server, so the backuppc server will set up 
 > > a connection to the client.
 > > If the client (my laptop) is not in the local area network, then the 
 > > backuppc server can't find the client and won't make a backup of it.
 > >
 > > In the situation I described above, my laptop will never be in the 
 > > local area network of the backuppc server. Therefor my laptop will 
 > > never be backuped.
 > >
 > > Is it possible to initiate a backup from the client machine, in a way 
 > > that the clients connects to the backuppc server over the internet to 
 > > start the backup? Instead of that the backuppc server makes a 
 > > connection to the client?
 > >
 > > If so, how?
 > >
 > > Thanks,
 > >
 > > Wim
 > >
 > >
 > I am working towards exactly the same idea, but for laptops that almost 
 > *never* come into the office. For example, you can kick off a full 
 > backup as follows:
 > 
 > BackupPC_serverMesg backup HOSTIP HOST USER FULL
 > 
 > I am working on (somehow) using cygwin on the Windows laptop to issue 
 > the *nix command, and I intend to use OpenVPN to establish the necessary 
 > network path whenever the laptop is connected to the internet. I will 
 > post when I have a working procedure, if someone else doesn't beat me to 
 > it first :-)

What is there to work on?

Probably best to use rsyncd over an ssh tunnel you are creating

Simply run the following from Windoze cygwin: (I won't guarantee that
there are no syntax errors here though)

# Start rsyncd server
cygrunsrv -S rsyncd

#Setup ssh tunnel, send server message to start backup, and wait to finish
ssh backuppc@yourserver -R 8873:localhost:873 BackupPC_serverMesg backup 
localhost hostname-or-alias backuppc [0/1] && while [ 1 ]; do sleep 60; 
BackupPC_serverMesg status jobs | grep '"cmd" => 
"BackupPC_dump[^"]*hostname-or-alias"' > /dev/null || break;done

# Stop rsyncd server
cygrunsrv -E rsyncd


Then in your config.pl set up rsyncd transfer method to localhost
(127.0.0.1) on port 8873 (or whatever port you want to use). You may
want to use a host alias too rather than using the generic hostname localhost

Note you could use rsync over ssh here but might as well do rsyncd
since you already have an ssh tunnel set up and no need to add the overhead.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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/