Re: [BackupPC-users] Execute script before backup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, The workaround based on PingCmd, DumpPostUserCmd, and a custom script to handle the VPN works like a charm. I'm so happy to see it working as expected :) Thank you all (Colin, Les, Russell and Holger) for all your comments and support :) Best regards, 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 18/12/14 a las 16:28, Holger Parplies escribió: Hi, Colin Shorts wrote on 2014-12-17 09:17:58 + [Re: [BackupPC-users] Execute script before backup]: On 17/12/14 07:50, Ibon Castilla wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, I have tested the workaround proposed by Colin, and I have a comment and a question about it: [...] That said, there was a follow-up from Les Mikesell that might work better. I need to fully agree with this. The suggestion to use BackupPC_serverMesg has downsides not yet covered here. You lose the scheduling capabilities of BackupPC. If a backup fails, BackupPC will retry it. Your cron job won't. BackupPC will keep track of when full backups are required and when incrementals will do. Your cron job can emulate that by requesting an auto backup instead of an explicit full or incremental, but that won't work together with BackupsDisable (see below). BackupPC has settings to regulate the number of simultaneous backups. A backup initiated with a serverMesg counts as user backup, not as automatically scheduled backup. There is no guarantee how close to the serverMesg the backup will actually be started. * Comment: the idea was to use BackupPC_serverMesg to launch the backup, and then use that command again to test if the server ended that backup successfully. I've realized that the command just tells the server to launch the backup, but it really doesn't do that action by itself, so I have to ask to the server many times if the backup has finished yet. Correct. Even worse, it will only *queue* the backup. Depending on configuration and other backups running, it could be hours before the backup even *starts*. This somewhat defeats the whole point, if your VPN is not guaranteed to survive a long idle period, and even if it is, you could just as well leave the VPN running permanently. Starting and stopping it suggests that you don't want it active outside the backup window. Instead of BackupPC_serverMesg I've decided to use BackupPC_dump, because this one does the backup by itself. By doing that, you lose even more. You do realize that you need to run a BackupPC_link, and that you cannot safely run that yourself, don't you? BackupPC will not really be aware of the fact that the backup has been run outside its control. I believe it will show up in the web interface by virtue of BackupPC_dump having updated the backups file, but I'm not sure what statistical values will be maintained correctly and whether automatic scheduling and error reporting would work. It's simply not the way BackupPC is designed to work. You're really taking a central piece of BackupPC and throwing the rest away, or rather, hoping the rest won't interfere. You might be better advised to just use plain rsync from the start. That won't give you pooling, compression or a web interface, but it would at least be a clean and flexible solution. [...] * Question: to use BackupPC_dump, the host must be defined on the host file. [...] avoid that I've been trying to use $Conf{BackupsDisable} on my_host.pl file. If I set that parameter to 1 or 2, then BackupPC_dump complains about it, saying that the host is configured to avoid backups. A value of 1 should disable scheduled backups while still running manual backups, but you would have to explicitly request full or incremental backups. What you are trying to do is not really supported. You might be better to leave the backups enabled and just increase the ages (FullPeriod and IncrPeriod) from 6.97 and 0.97 respectively, to something a little higher, that way the backuppc won't attempt to backup the host as long as your scheduled task is working. Yes, but it also won't *succeed* in backing up the host when the scheduled task is *not* working, because it won't set up the VPN link, so you don't gain the fallback you are aiming at. Setting FullPeriod and IncrPeriod to really high values (say 1 = almost thirty years) should avoid automatic backups, unless, of course, something strange happens to your system clock ;-). Regards, Holger -- 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
Re: [BackupPC-users] Execute script before backup
Hi, Colin Shorts wrote on 2014-12-17 09:17:58 + [Re: [BackupPC-users] Execute script before backup]: On 17/12/14 07:50, Ibon Castilla wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, I have tested the workaround proposed by Colin, and I have a comment and a question about it: [...] That said, there was a follow-up from Les Mikesell that might work better. I need to fully agree with this. The suggestion to use BackupPC_serverMesg has downsides not yet covered here. You lose the scheduling capabilities of BackupPC. If a backup fails, BackupPC will retry it. Your cron job won't. BackupPC will keep track of when full backups are required and when incrementals will do. Your cron job can emulate that by requesting an auto backup instead of an explicit full or incremental, but that won't work together with BackupsDisable (see below). BackupPC has settings to regulate the number of simultaneous backups. A backup initiated with a serverMesg counts as user backup, not as automatically scheduled backup. There is no guarantee how close to the serverMesg the backup will actually be started. * Comment: the idea was to use BackupPC_serverMesg to launch the backup, and then use that command again to test if the server ended that backup successfully. I've realized that the command just tells the server to launch the backup, but it really doesn't do that action by itself, so I have to ask to the server many times if the backup has finished yet. Correct. Even worse, it will only *queue* the backup. Depending on configuration and other backups running, it could be hours before the backup even *starts*. This somewhat defeats the whole point, if your VPN is not guaranteed to survive a long idle period, and even if it is, you could just as well leave the VPN running permanently. Starting and stopping it suggests that you don't want it active outside the backup window. Instead of BackupPC_serverMesg I've decided to use BackupPC_dump, because this one does the backup by itself. By doing that, you lose even more. You do realize that you need to run a BackupPC_link, and that you cannot safely run that yourself, don't you? BackupPC will not really be aware of the fact that the backup has been run outside its control. I believe it will show up in the web interface by virtue of BackupPC_dump having updated the backups file, but I'm not sure what statistical values will be maintained correctly and whether automatic scheduling and error reporting would work. It's simply not the way BackupPC is designed to work. You're really taking a central piece of BackupPC and throwing the rest away, or rather, hoping the rest won't interfere. You might be better advised to just use plain rsync from the start. That won't give you pooling, compression or a web interface, but it would at least be a clean and flexible solution. [...] * Question: to use BackupPC_dump, the host must be defined on the host file. [...] avoid that I've been trying to use $Conf{BackupsDisable} on my_host.pl file. If I set that parameter to 1 or 2, then BackupPC_dump complains about it, saying that the host is configured to avoid backups. A value of 1 should disable scheduled backups while still running manual backups, but you would have to explicitly request full or incremental backups. What you are trying to do is not really supported. You might be better to leave the backups enabled and just increase the ages (FullPeriod and IncrPeriod) from 6.97 and 0.97 respectively, to something a little higher, that way the backuppc won't attempt to backup the host as long as your scheduled task is working. Yes, but it also won't *succeed* in backing up the host when the scheduled task is *not* working, because it won't set up the VPN link, so you don't gain the fallback you are aiming at. Setting FullPeriod and IncrPeriod to really high values (say 1 = almost thirty years) should avoid automatic backups, unless, of course, something strange happens to your system clock ;-). Regards, Holger -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, I have tested the workaround proposed by Colin, and I have a comment and a question about it: * Comment: the idea was to use BackupPC_serverMesg to launch the backup, and then use that command again to test if the server ended that backup successfully. I've realized that the command just tells the server to launch the backup, but it really doesn't do that action by itself, so I have to ask to the server many times if the backup has finished yet. Instead of BackupPC_serverMesg I've decided to use BackupPC_dump, because this one does the backup by itself. This way, when it finishes a backup I can set down the VPN tunnel without asking the server. * Question: to use BackupPC_dump, the host must be defined on the host file. This way BackupPC will try to back it up as a regular host, and to avoid that I've been trying to use $Conf{BackupsDisable} on my_host.pl file. If I set that parameter to 1 or 2, then BackupPC_dump complains about it, saying that the host is configured to avoid backups. Is there a way to set up the configuration of my_host and at the same time avoid BackupPC to back ip up as a regular host, and just when I want to do it manually?. 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 12:22, Colin Shorts escribió: On 16/12/14 11:09, Ibon Castilla wrote: Hi Colin, Nice idea :) I'm guessing if I can use the web interface just to see backups (or to download some file). I'll give that approach a try. Thanks, and yes, the web interface would still show you everything as it was before. Cheers, Ibon. Abrazo, Ibon. Usa Software Libre, tus úlceras te lo agradecerán Realizado con Software Libre. -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.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) iEYEARECAAYFAlSRNdAACgkQF4+m/XX56ynGZACfS64ahhSknG2OcPUINUc2fpzr 94YAnjulTPfIEgVIIdxCrJV7GInRmCDj =NDnA -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
On 17/12/14 07:50, Ibon Castilla wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi again, I have tested the workaround proposed by Colin, and I have a comment and a question about it: * Comment: the idea was to use BackupPC_serverMesg to launch the backup, and then use that command again to test if the server ended that backup successfully. I've realized that the command just tells the server to launch the backup, but it really doesn't do that action by itself, so I have to ask to the server many times if the backup has finished yet. Instead of BackupPC_serverMesg I've decided to use BackupPC_dump, because this one does the backup by itself. This way, when it finishes a backup I can set down the VPN tunnel without asking the server. * Question: to use BackupPC_dump, the host must be defined on the host file. This way BackupPC will try to back it up as a regular host, and to avoid that I've been trying to use $Conf{BackupsDisable} on my_host.pl file. If I set that parameter to 1 or 2, then BackupPC_dump complains about it, saying that the host is configured to avoid backups. Is there a way to set up the configuration of my_host and at the same time avoid BackupPC to back ip up as a regular host, and just when I want to do it manually?. You might be better to leave the backups enabled and just increase the ages (FullPeriod and IncrPeriod) from 6.97 and 0.97 respectively, to something a little higher, that way the backuppc won't attempt to backup the host as long as your scheduled task is working. That said, there was a follow-up from Les Mikesell that might work better. Cheers, Colin 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 12:22, Colin Shorts escribió: On 16/12/14 11:09, Ibon Castilla wrote: Hi Colin, Nice idea :) I'm guessing if I can use the web interface just to see backups (or to download some file). I'll give that approach a try. Thanks, and yes, the web interface would still show you everything as it was before. Cheers, Ibon. Abrazo, Ibon. Usa Software Libre, tus úlceras te lo agradecerán Realizado con Software Libre. -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.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) iEYEARECAAYFAlSRNdAACgkQF4+m/XX56ynGZACfS64ahhSknG2OcPUINUc2fpzr 94YAnjulTPfIEgVIIdxCrJV7GInRmCDj =NDnA -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ -- Colin Shorts c.sho...@intrallect.com +44 (0) 131 292 0104 http://www.intrallect.com 137A George Street, Edinburgh, EH2 4JY, Scotland Intrallect is part of the Leading Software Group -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Execute script before backup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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. Before going any deeper I would like to know if I'm missing a proper/official way to achieve what I want. Any suggestion? :) 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 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSQCg0ACgkQF4+m/XX56ylaFgCdEWOLaYD53X262YlAe3og6iId reIAn06O+lXSyJ89mLgE3+pmdjqotf7K =D5We -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
On 16/12/14 10:31, Ibon Castilla wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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. Why not do this outside of backuppc's web interface? * Disable backuppc for the host. * Create a script to run as a cron job for the *backuppc* user that; 1. creates the vpn tunnel 2. runs backuppc for the host /usr/share/backuppc/bin/BackupPC_serverMesg backup hostname hostname backuppc 0|1 In the last argument, 0=incremental, 1=full 3. check for the job finishing and then close the tunnel /usr/share/backuppc/bin/BackupPC_serverMesg 'status host(hostname)' Parse the output of above as required and exit when state = Status_idle It's not official, but it should work fine. NOTE: the backup script should be called as the backuppc user or breakage may occur. -Colin 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 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlSQCg0ACgkQF4+m/XX56ylaFgCdEWOLaYD53X262YlAe3og6iId reIAn06O+lXSyJ89mLgE3+pmdjqotf7K =D5We -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ -- Colin Shorts c.sho...@intrallect.com +44 (0) 131 292 0104 http://www.intrallect.com 137A George Street, Edinburgh, EH2 4JY, Scotland Intrallect is part of the Leading Software Group -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Colin, Nice idea :) I'm guessing if I can use the web interface just to see backups (or to download some file). I'll give that approach a try. 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 11:51, Colin Shorts escribió: On 16/12/14 10:31, Ibon Castilla 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. Why not do this outside of backuppc's web interface? * Disable backuppc for the host. * Create a script to run as a cron job for the *backuppc* user that; 1. creates the vpn tunnel 2. runs backuppc for the host /usr/share/backuppc/bin/BackupPC_serverMesg backup hostname hostname backuppc 0|1 In the last argument, 0=incremental, 1=full 3. check for the job finishing and then close the tunnel /usr/share/backuppc/bin/BackupPC_serverMesg 'status host(hostname)' Parse the output of above as required and exit when state = Status_idle It's not official, but it should work fine. NOTE: the backup script should be called as the backuppc user or breakage may occur. -Colin Cheers, Ibon. -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.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) iEYEARECAAYFAlSQEu8ACgkQF4+m/XX56yl0YACdG9Ya822mHbfFRkt0P7DKgxTT iw8AnjKJ9l6QmzsyJwM6q2KSvEC5/Nqg =bD2i -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
On 16/12/14 11:09, Ibon Castilla wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Colin, Nice idea :) I'm guessing if I can use the web interface just to see backups (or to download some file). I'll give that approach a try. Thanks, and yes, the web interface would still show you everything as it was before. 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 11:51, Colin Shorts escribió: On 16/12/14 10:31, Ibon Castilla 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. Why not do this outside of backuppc's web interface? * Disable backuppc for the host. * Create a script to run as a cron job for the *backuppc* user that; 1. creates the vpn tunnel 2. runs backuppc for the host /usr/share/backuppc/bin/BackupPC_serverMesg backup hostname hostname backuppc 0|1 In the last argument, 0=incremental, 1=full 3. check for the job finishing and then close the tunnel /usr/share/backuppc/bin/BackupPC_serverMesg 'status host(hostname)' Parse the output of above as required and exit when state = Status_idle It's not official, but it should work fine. NOTE: the backup script should be called as the backuppc user or breakage may occur. -Colin Cheers, Ibon. -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.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) iEYEARECAAYFAlSQEu8ACgkQF4+m/XX56yl0YACdG9Ya822mHbfFRkt0P7DKgxTT iw8AnjKJ9l6QmzsyJwM6q2KSvEC5/Nqg =bD2i -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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/ -- Colin Shorts c.sho...@intrallect.com +44 (0) 131 292 0104 http://www.intrallect.com 137A George Street, Edinburgh, EH2 4JY, Scotland Intrallect is part of the Leading Software Group -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Execute script before backup
On Tue, Dec 16, 2014 at 4:31 AM, Ibon Castilla ibon.casti...@gmail.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. -- Les Mikesell lesmikes...@gmail.com -- 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=164703151iu=/4140/ostg.clktrk ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/