BackupPC-users

Re: [BackupPC-users] Fwd: Re: Execute script before backup

2014-12-17 03:44:58
Subject: Re: [BackupPC-users] Fwd: Re: Execute script before backup
From: Ibon Castilla <ibon.castilla AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 17 Dec 2014 09:43:44 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

Just to thank you and Les because of the ideas you both propose.
Yesterday evening I tried Colin's workaround and seems to work but I
have some comments about it (just write to list again about them).
If Colin suggested idea finally gets stucked, I'm glad because of this
alternative way you explain. Seems to me more integrated into
BackupPC's structure, and I will definitively give it a try too :)

Cheers, Ibon.

Abrazo, Ibon.

Usa Software Libre, tus úlceras te lo agradecerán
Realizado con Software Libre.
- --
GPG public key at http://sinanimodelucro.net/ibon_gmail.asc
Finderprint: 1761 59B9 6DE6 0402 31B9 1872 178F A6FD 75F9 EB29

El 16/12/14 a las 20:47, Russell Poyner escribió:
> 
> I'll agree with Les here. I think there should be a way to do this 
> either through PingCmd or through DumpPreUserCmd.  My current set
> up (48 mostly windows clients) has customized scripts for both of
> these. PingCmd sends wake on lan packets and waits several minutes
> to see if the host responds. DumpPreUserCmd modifies an html file
> that the client polls every 5 minutes. When the client reads a
> start signal in the html file it creates a shadow copy and launches
> rsync daemon on it. While that is going on DumpPreUserCmd is
> waiting and polling for up to 20 minutes to see if the client
> launches the rsync daemon. DumpPostUserCmd modifies the html back
> to the stop state. When the client sees that it stops the rsync
> daemon and deletes the shadow copy.
> 
> The idea is that you can achieve pretty sophisticated behaviour
> with PingCmd, DumpPreUserCmd and DumpPostUserCmd. I'd think you
> could stand up the vpn with the pre command and tear it down with
> the post command.
> 
> The way to start is to write your scripts and test them by hand
> until they are doing what you want. Then configure backuppc to use
> them either as PingCmd or DumpPreUserCmd and DumpPostUserCmd. You
> communicate success or failure of your script to backuppc through
> the exit status. exit 0 from PingCmd means the host is reachable on
> the network (ie the "ping" worked). exit 0 from DumpPreUserCmd
> causes backuppc to start the dump, provided that
> $Conf{UserCmdCheckStatus} = 1;
> 
> Think of it as an opportunity to prove your scripting skills and
> have fun!
> 
> RP
> 
> 
> 
> On 12/16/2014 11:18 AM, Les Mikesell wrote:
>> On Tue, Dec 16, 2014 at 4:31 AM, Ibon Castilla
>> <ibon.castilla AT gmail DOT com> wrote:
>>> Hi there,
>>> 
>>> I'm trying to figure out how to execute some actions, right
>>> before doing a backup. What I want to do is to backup a remote
>>> host (not in the LAN) and to achieve so I have a VPN tunnel set
>>> up. My ideal scenario would be: 1) before anything else connect
>>> to the tunnel, 2) then backup the host, 3) after successful
>>> backup close the tunnel.
>>> 
>>> What I try so far: * Play with $Conf{DumpPreUserCmd}. As I have
>>> read in the documentation, this parameter has been thought to
>>> execute some commands after I reach the host, and before doing
>>> the dump, so not applicable to my scenario. * Play with
>>> $Conf{RsyncClientCmd}. Before 'ssh-ing' anything I have tried
>>> to set up the VPN tunnel, but again there is a host resolution 
>>> command before this, and obviously it fails.
>> I haven't tried it, but I would think you could use PingCmd to
>> run a script that brings up the VPN (possibly needing
>> ClientNameAlias to be set to the IP of the remote endpoint to
>> avoid lookups before connecting), and perhaps a DumpPostUserCmd
>> to close the connection.
>> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
>
> 
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards with Interactivity, Sharing, Native Excel Exports, App
> Integration & more Get technology previously reserved for
> billion-dollar corporations, FREE 
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>
> 
_______________________________________________
> 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/
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlSRQkAACgkQF4+m/XX56ykeLQCeJfrMCh2zOrT8s0bukE9KpdlC
w4UAmwSpLS/VTvp2xO+ha2yYItTBClW4
=5HtM
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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/
<Prev in Thread] Current Thread [Next in Thread>