Hi, Johan Ehnberg wrote on 2016-06-27 16:03:42 +0300 [Re: [BackupPC-users] BacupPC -How not to start backup when lock file is present ?]: > Hi, > > You can do it the other way around:
... by top-posting? > run the database dump with > $Conf{DumpPreUserCmd}. > [...] > On 06/27/2016 03:54 PM, phil123456 wrote: > > hello, > > > > I am exporting my database before backup > > but the time it takes may vary, and I want things to be automatic > > so I create a lock file when export starts and remove it when it is finished > > > > I would like backup pc to start the backup when everything is done > > > > is there a wy to achieve this ? Yes. You can also use DumpPreUserCmd together with UserCmdCheckStatus to check for the existance of the lock file and abort the backup attempt if it exists. This might have advantages by not keeping BackupPC busy for a long time while creating the database export (other backups could run during this time), and you would avoid rebuilding the database export every time in case the backup fails (and is retried on the next wakeup). You could even abuse PingCmd for that (not sure which is better). Also, it might not be easy to start the command from the BackupPC daemon (e.g. if it needs to run on a different machine or with different user/group or is needed for something besides the backup), while it might be trivial to check for the lock file (NFS or local stat). One thing to keep in mind, though, is that BackupPC's backup might run *before* the database export is created. You could circumvent that by using "lock files" including the date, creating them *after* the export and requiring their existance rather than non-existance. Perhaps the created dump file itself could serve this purpose ... Hope that helps. Regards, Holger ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ 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/