QUESTION backing up production PiaF to standby system

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
676
Reaction score
194
I have Piaf running in production and working well(after a looong journey). I have a 2nd Paif, same hardware, same software, updates, just without the settings(trunks, in/outbound, ext, etc...). I have setup incrediblebackup and have done a backup from production and then restore to 2nd box and it works fine.

My question, I have to do the backup manually(usually after a setting change), how can i set this up to run automatic and daily? I've read that it can't be put in a cron job, so I am just confused as how people are doing it here? Getting from production to backup server, I should be able to figure out, its just getting it to run automatically.

My goal, with Poweredge Drac installed(PE 1950's), if the production server takes a hit, I should be able to do a restore and change the IP address and have the system back up in 10-15 minutes, my plan anyway.

Thanks for any help,
Brian



PIAF Green: 2.0.6.5
Asterisk: 11.14.1
Kernal: 2.6.32-431.1.2.0.1.el6.i686 - 32 Bit
 
I've looked at incrediblebackup / incrediblerestore.
There doesn't seem to be an issue with putting incrediblebackup in cron. AFAICT the issue comes in because incrediblebackup gets the date and makes that part of the backup name.
Code:
NOW=`date +'%Y.%m.%d.%H.%M'`
.
BACKUP="$PLATFORM-$NOW-A${VER:9}-F$FPBX-I$IPBX.tar"
.
tar -cf $BACKUP /var/www /var/lib/mysql...

But then incrediblerestore asks the user what backup to restore from.

So... it seems your choice is to either change your recovery setup (e.g. backup nightly, restore the most recent manually if/when the primary box gets hit) or change the scripts (eg, change incrediblebackup to always backup to the same name*, put that name in incrediblerestore)

*an oversimplification; I'd suggest appending a couple of likes to rm $MOST_RECENT then copy $BACKUP to $MOST_RECENT- so you have nightlies that are being stored plus one with a name that's easy to code into incrediblerestore. Note that this, too is a bit fragile: what happens if you get hit in the middle of a backup? Maybe create a file names 'complete' once the copy is done and toggle incrediblerestore on that

Full disclosure: I'm kind of a noob here (but many years of win programming). Jumping in as scripts are pretty easy and nobody else has answered...

Also: you've thought through the whole "don't back up on a disk on the source machine", right?
 
"don't backup on the source machine" - i do, but then immediately copy it over to the backup server....still working on getting mounting to windows share to work.
Thanks,
brian
 

Members online

Forum statistics

Threads
26,687
Messages
174,411
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top