Re: [BackupPC-users] Help with the schedule config

2017-05-25 Thread Kris Lou
Also digging deep ... (wish we still had the old wiki!)



Run/schedule a backup on a single host.

BackupPC_serverMesg backup HOSTIP HOST USER 0/1

schedule backup for a host now. 0/1 0 incremental backup, 1 full
backup. E.G.

   /usr/share/backuppc/bin/BackupPC_serverMesg backup host.example.tld
host.example.tld backuppc 1

The syntax to get status for a single host is:

BackupPC_serverMesg 'status host(mail.test.com)'

Run (schedule really) nightly cleanup

BackupPC_serverMesg BackupPC_nightly run

Dump some info. Pipe to perltidy as it is a nested data structure.
Not sure what it's actually dumping or how to use it or glean info
from it.

  BackupPC_serverMesg status info

Dump currently running (and maybe scheduled??) jobs. Looks like an
associative array with the keys set to the hostname or other service
jobs like " trashClean". Again useful to pipe through perltidy.

  BackupPC_serverMesg status jobs


List status of each host. State field will tell you if the host is
idle, backup is in progress...

  BackupPC_serverMesg status hosts

Start scheduling backups for all hosts

  BackupPC_serverMesg backup all



Stop/delay backups

BackupPC_serverMesg stop HOST REQ_USER BACKOFF

HOST is the host to cancel, REQ_USER is the requesting user (just for
log purposes) and BACKOFF is the backoff time in hours.


https://sourceforge.net/p/backuppc/mailman/message/19201808/

Also current docs:
https://github.com/backuppc/backuppc/blob/c4b4c643c9c1a9f5400e70135cbd9ba46ca71ede/doc-src/BackupPC.pod#step-7-talking-to-backuppc
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Help with the schedule config

2017-05-25 Thread Vladislav Kurz
On 05/25/17 10:02, Alexey Safonov wrote:
> that's nice
> 
> is there any list of all commands available in BPC ?

I tried to find some reference, but found only this old post in this
mailing list, which I probably used when I was solving the same problem:
https://sourceforge.net/p/backuppc/mailman/message/12063875/

If you find something more detailed, please post it here.

-- 
Best Regard
Vladislav Kurz


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] Help with the schedule config

2017-05-25 Thread Vladislav Kurz
On 05/24/17 14:41, Yong Zhang wrote:
> Hi, all
> 
>  
> 
> I'm new to BackupPC, I installed v4.0 these days, but hard to understand
> schedule settings, I have some queries here:
> 
>  
> 
> 1) I want servers to be backed up daily, but full backup only runs on
> Saturday, how?

Hello,

I use this line in crontab to enforce full backup on weekends:

55 19 * * 5 backuppc /usr/share/backuppc/bin/BackupPC_serverMesg backup
HOSTIP HOST USER 1

I usually put the time to run at 5 minutes before the end of blackout
period to ensure that it will start earlier than normal backup run.
Also I put FQDN for both HOST and HOSTIP. Number 1 at the end means full
backup (0 would be incremental).

-- 
Best Regards
Vladislav Kurz

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] Help with the schedule config

2017-05-24 Thread Kris Lou
I'll take a stab at it.

On Wed, May 24, 2017 at 5:41 AM, Yong Zhang  wrote:

> 1) I want servers to be backed up daily, but full backup only runs on
> Saturday, how?
>

AFAIK, there isn't an easy way to determine when specific backups
(full/incr) run. My understanding is that BackupPC runs within the context
of the blackout periods and client visibility, and executes full/incr
depending upon the expiration counts of the existing backups.

That being said, you could manually start a full backup on a Saturday and
hope for the best within a 7-day cycle.  Or you can set a cron job, but
then you're missing out on the ability to automatically stagger backups.

It just occurred to me, you could leverage a DumpPreUserCmd (combined with
UserCmdCheckStatus) to verify the day (Saturday), dump type (Full), and
exit status (Yes, it is) on whether or not to proceed.  I think that a
non-zero status here would put the client back into the queue, and it would
try the same dump again upon the next wake.  There are probably other
caveats -- like whether a client sitting in the queue for a long time might
have some existing backups expired and purged in the interim, but it's
something to consider.


> 2) I want servers to have incremental backup daily for 6 days then 1 full
> backup, and keep all these backups (inc/full) for one month, but after one
> month, I only need to keep weekly full backups for 180 days (that is about
> 24 full backups total), and after 180 days, I just want to keep full
> backups at monthly basis e.g. keep one full backup one month and 12 months
> total. Is this possible and how to set the values in config?
>

If I'm reading the docs right:
* FullPeriod = 7 days
* FullPeriod * 1 = 24 backups
* FullPeriod * 2 = 0 backups
* FullPeriod * 4 = 12 backups

So KeepFullCnt = [24,0,12], with IncKeepCnt=24.  This is a little more
Lunar and less Gregorian, but that's what we get for mixing weeks and
months.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Help with the schedule config

2017-05-24 Thread Yong Zhang
Hi, all

I'm new to BackupPC, I installed v4.0 these days, but hard to understand 
schedule settings, I have some queries here:

1) I want servers to be backed up daily, but full backup only runs on Saturday, 
how?
2) I want servers to have incremental backup daily for 6 days then 1 full 
backup, and keep all these backups (inc/full) for one month, but after one 
month, I only need to keep weekly full backups for 180 days (that is about 24 
full backups total), and after 180 days, I just want to keep full backups at 
monthly basis e.g. keep one full backup one month and 12 months total. Is this 
possible and how to set the values in config?

Thanks for the help.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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/