|
||||||||||
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: #!/bin/sh USER=<user> PASS=<password> PROTO=http M0N0IP=<host/ip> BASE=/path/to/backups FILE=$(date +%Y-%m-%d-%H:%M)-config.xml curl -s -o "$BASE/$FILE" -F Submit=download -u "$USER:$PASS" "$PROTO://$M0N0IP/diag_backup.php" gzip "$BASE/$FILE" find "$BASE" -mtime +90 -print0 | xargs -0 rm -f Heavily inspired by what's posted on http://doc.m0n0.ch/handbook/ thirdparty-automatedbackups.html HTH, Chris PS: Feel free to add my script to the list if anyone finds it useful... -- Chris Boot bootc at bootc dot net http://www.bootc.net/ |