|
|
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>
| | Moved to [https://github.com/invadelabs/cron-invadelabs/blob/master/dd-wrt_backup.sh GitHub]. |
| | |
| <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>
| |