[ previous ] [ next ] [ threads ]
 From:  Chris Boot <bootc at bootc dot net>
 To:  "Aaron Cherman" <aaronc at morad dot ab dot ca>
 Cc:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Re: [m0n0wall] How Often Do You Backup Your m0n0wall Config?
 Date:  Wed, 16 Jan 2008 23:00:03 +0000
On 16 Jan 2008, at 22:56, Aaron Cherman wrote:

> Hey everyone, I hope this isn't considered spam to everyone.  I see  
> posts every so often of users who have a m0n0wall installation that  
> is not responding for various reasons and have a need to get there  
> config.xml due to the lack of a backup.  I am curious how often  
> everyone else backs up their configs.  I backup mine every time I  
> make a major change (ie. add/remove/change a filter rule, add/ 
> remove/change a NAT mapping, etc.).  My backups could be a couple  
> times a day and sometime not for over a month.
> Anyone else?
> Aaron

I've just set up a script to do this daily and and keep 90 days worth  
of backups:

FILE=$(date +%Y-%m-%d-%H:%M)-config.xml

curl -s -o "$BASE/$FILE" -F Submit=download -u "$USER:$PASS"  
gzip "$BASE/$FILE"
find "$BASE" -mtime +90 -print0 | xargs -0 rm -f

Heavily inspired by what's posted on http://doc.m0n0.ch/handbook/ 


PS: Feel free to add my script to the list if anyone finds it useful...

Chris Boot
bootc at bootc dot net