automated backup solution

General questions.
Post Reply
axel2078
Posts: 294
Joined: January 30th, 2013, 3:53 am
Location: IL, USA

automated backup solution

Post by axel2078 » January 30th, 2013, 4:06 am

Hello everyone. I'm a newbie to IPFire. I was using Smoothwall as my firewall until just a couple days ago when I switched over to IPFire. I like it so far. I do have a question though. Is there an automated solution available for backups? I had this set up in Smoothwall, but I'm not really sure how to do it with IPFire. Thanks.
Image

axel2078
Posts: 294
Joined: January 30th, 2013, 3:53 am
Location: IL, USA

Re: automated backup solution

Post by axel2078 » February 2nd, 2013, 1:28 am

Ok, how about this....which script enables you to do a backup from the Backup tab on the system page? I'd like to automate this if possible.
Image

smallhagrid
Posts: 59
Joined: July 9th, 2012, 2:47 am
Location: Southern Vermont
Contact:

Solution=>Re: backup

Post by smallhagrid » February 4th, 2013, 8:39 pm

IPFire's backup is manual - and incomplete - not a good solution.

For best coverage in case of catastrophic failure I've used & tested Redo Backup with 100% success.
This is not automated, but at least it works 100% with all the plugins, settings, etc.

Given that an IPFire configuration will usually be seldom changed and used always, it seems to me that only backing it up fully after making a change would matter...?

I've posted about this subject here as well, after finding how disappointing the built-in backup function was - and I asked almost the same question as the OP in this thread.
( http://forum.ipfire.org/index.php/topic,6917.msg46555.html#msg46555 )

Should anyone find a better - easier - quicker - more automated way to do this, PLEASE share it with the rest of us ?!?

Best Wishes.

mark
Last edited by smallhagrid on February 4th, 2013, 8:54 pm, edited 1 time in total.

User avatar
andremorro
Global Moderator
Global Moderator
Posts: 515
Joined: July 4th, 2012, 1:17 pm
Location: Florianópolis, SC - Brasil

Re: automated backup solution

Post by andremorro » February 5th, 2013, 3:59 pm

I´m pretty sure this could be done by Cron with a little amout of investigation of IPFire backup job.

Maybe adding some features to your own script would be enough.
I´ll try to make one since I need a backup...

If works fine, I´ll post-it here.
Image

axel2078
Posts: 294
Joined: January 30th, 2013, 3:53 am
Location: IL, USA

Re: automated backup solution

Post by axel2078 » February 19th, 2013, 6:36 pm

andremorro wrote:I´m pretty sure this could be done by Cron with a little amout of investigation of IPFire backup job.

Maybe adding some features to your own script would be enough.
I´ll try to make one since I need a backup...

If works fine, I´ll post-it here.


Hello, Andremorro. I was just wondering if you had a chance to test your backup script? :)
Image

User avatar
andremorro
Global Moderator
Global Moderator
Posts: 515
Joined: July 4th, 2012, 1:17 pm
Location: Florianópolis, SC - Brasil

Re: automated backup solution

Post by andremorro » February 28th, 2013, 4:26 pm

Hi there,

Not yet. I wrote a few lines and test it out, it worked fine, as soon as I got it ready, I'll send you.

So far, thats what I got:

configs and logs to rsync @ backup machine
Image

dnl
Posts: 375
Joined: June 28th, 2013, 11:03 am

Re: automated backup solution

Post by dnl » October 13th, 2013, 2:44 am

Hi andremorro,

I know this is an old thread, but I'm also interested in automated backups.

If you've not had a chance to write a script for automated backups, I could do so if you can let me know exactly what is backed up by the WUI backup (including logfiles) and the various addons backups (like hostapd for WiFi)?

Thanks!
IPFire 2.x (Latest Update) on x86_64 Intel Bay Trail CPU, 4GiB RAM, RED + GREEN + BLUE + ORANGE

User avatar
andremorro
Global Moderator
Global Moderator
Posts: 515
Joined: July 4th, 2012, 1:17 pm
Location: Florianópolis, SC - Brasil

Re: automated backup solution

Post by andremorro » October 19th, 2013, 2:15 pm

Hello my friend, I'll be glad to help you out.

I'm working my a** off now a days, got no time at all.
As soon as I get my vacations, I'll be glad to help you out, so we can build a good backup script.

Best Regards,
André Morro.
Image

dnl
Posts: 375
Joined: June 28th, 2013, 11:03 am

Re: automated backup solution

Post by dnl » October 25th, 2013, 11:02 am

andremorro wrote:Hello my friend, I'll be glad to help you out.

I'm working my a** off now a days, got no time at all.
As soon as I get my vacations, I'll be glad to help you out, so we can build a good backup script.

Best Regards,
André Morro.


No worries, I understand.  Take your time.
IPFire 2.x (Latest Update) on x86_64 Intel Bay Trail CPU, 4GiB RAM, RED + GREEN + BLUE + ORANGE

adnanh
Posts: 21
Joined: September 11th, 2013, 2:23 pm

Re: automated backup solution

Post by adnanh » October 29th, 2013, 9:04 am

Andre Morro,
Waiting for your reply anxiously :)

smstnitc
Posts: 2
Joined: October 12th, 2014, 1:55 am

Re: automated backup solution

Post by smstnitc » August 20th, 2015, 2:13 am

Quick look at backup.cgi and how it works...

/usr/local/bin/backupctrl iso

This will create the iso to recover from. I'm scheduling it to run as a weekly cron.

The iso's are in /var/tmp/backupiso

I'm thinking to nfs mount a share from my freenas box to /var/tmp/backupiso so backups will always be off-machine.

to create a backup with logs:

/usr/local/bin/backupctrl include

And without logs:

/usr/local/bin/backupctrl exclude


Dan.

User avatar
H&M
Posts: 471
Joined: May 29th, 2014, 9:38 pm
Location: Europe

Re: automated backup solution

Post by H&M » August 26th, 2015, 3:41 pm

smstnitc wrote:Quick look at backup.cgi and how it works...

/usr/local/bin/backupctrl iso

This will create the iso to recover from. I'm scheduling it to run as a weekly cron.

The iso's are in /var/tmp/backupiso




Hi Dan,
More than a year ago I've asked how I can restore IPFire having all backups available after I've lost the SD where it was installed (SD card died).
At that time I've been told that I need to do a fresh install and restore the settings from the backup - as long as the backup was for the same version (core distribution). Note: I also use IPFire without video - serial console only.
Here is the post where I've gor this info: viewtopic.php?f=27&t=4617&p=70142&hilit=restore+from+iso#p70142

So the ISO can't be used as recovery for IPFire running on SD and without video - only serial (like recover from scratch - get a new disk and dump it somehow on it). You need a working IPFire and yo need to bring the ISO back on that working instance of the IPFire.


Due to these limitations I've did some while ago a script that makes an image (dd - disk dump) of the IPFire.
It also saves the whole root partition in a tgz file.
This mechanism requires to boot from an external OS - in my case I have 2 disks in the box, each of them containing IPFire, and one instance doing back-up to the other IPFire Instance - all is automated.
The only thing that is manual is the boot - I have to manually choose the disk I need to boot.

And the backup is done to an external NFS mount dedicated for storing the backups. Exactly as you wanted.

If you are interested, I will search for my post where I've put the script.
Late edit: here is the post: viewtopic.php?f=27&t=12305&p=79331&hilit=img#p79331

PS: the idea of duplicating the installation on 2 different disks came from PFSense - there I've saw 2 slices, and if one did not work, you can use the backup one.

Best,
H&M

Post Reply