BackupDD-WRTConfig: Difference between revisions
Jump to navigation
Jump to search
(New page: <pre>0 4 * * * cd /mnt/raid5/backup/dd-wrt; wget --user=root --password=admin http://192.168.1.1/nvrambak.bin; mv nvrambak.bin nvrambak.bin`date +%F.%T`;</pre>) |
No edit summary |
||
Line 1: | Line 1: | ||
<pre>0 4 * * * cd /mnt/raid5/backup/dd-wrt; wget --user=root --password=admin http://192.168.1.1/nvrambak.bin; mv nvrambak.bin nvrambak.bin`date +%F.%T`;</pre> | <pre>0 4 * * * cd /mnt/raid5/backup/dd-wrt; wget --user=root --password=admin http://192.168.1.1/nvrambak.bin; mv nvrambak.bin nvrambak.bin`date +%F.%T`;</pre> | ||
<pre>$ cat dd-wrt_backup.sh | |||
#!/bin/sh | |||
ip="192.168.1.1" | |||
user="root" | |||
pass="password_goes_here" | |||
logfile="/home/drew/cron/dd-wrt_backup.log" | |||
cfefile="/mnt/raid5/drew/backup/dd-wrt/cfe.bin-`date +%F.%T`"; | |||
nvrambakfile="/mnt/raid5/drew/backup/dd-wrt/nvrambak.bin-`date +%F.%T`"; | |||
wget -a $logfile --user=$user --password=$pass \ | |||
http://$ip/backup/cfe.bin -O $cfefile; | |||
gzip $cfefile; | |||
wget -a $logfile --user=$user --password=$pass \ | |||
http://$ip/nvrambak.bin -O $nvrambakfile; | |||
gzip $nvrambakfile; | |||
wget -a $logfile --user=$user --password=$pass \ | |||
http://$ip/traffdata.bak -O- | gzip > \ | |||
/mnt/raid5/drew/backup/dd-wrt/traffdata.bak.`date +%F.%T`.gz; | |||
</pre> |
Revision as of 23:10, 14 June 2011
0 4 * * * cd /mnt/raid5/backup/dd-wrt; wget --user=root --password=admin http://192.168.1.1/nvrambak.bin; mv nvrambak.bin nvrambak.bin`date +%F.%T`;
$ cat dd-wrt_backup.sh #!/bin/sh ip="192.168.1.1" user="root" pass="password_goes_here" logfile="/home/drew/cron/dd-wrt_backup.log" cfefile="/mnt/raid5/drew/backup/dd-wrt/cfe.bin-`date +%F.%T`"; nvrambakfile="/mnt/raid5/drew/backup/dd-wrt/nvrambak.bin-`date +%F.%T`"; wget -a $logfile --user=$user --password=$pass \ http://$ip/backup/cfe.bin -O $cfefile; gzip $cfefile; wget -a $logfile --user=$user --password=$pass \ http://$ip/nvrambak.bin -O $nvrambakfile; gzip $nvrambakfile; wget -a $logfile --user=$user --password=$pass \ http://$ip/traffdata.bak -O- | gzip > \ /mnt/raid5/drew/backup/dd-wrt/traffdata.bak.`date +%F.%T`.gz;