BackupDD-WRTConfig: Difference between revisions

From DrewWiki
Jump to navigation Jump to search
No edit summary
m (Drew moved page Backup DD-WRT Config to BackupDD-WRTConfig without leaving a redirect: renaem to BackupDD-WRTConfig)
 
(4 intermediate revisions by the same user not shown)
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>
=Source=
Moved to [https://github.com/invadelabs/cron-invadelabs/blob/master/dd-wrt_backup.sh GitHub].


<pre>$ cat dd-wrt_backup.sh
=Cron=
#!/bin/sh
<syntaxhighlight lang=bash>
 
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`;
ip="192.168.1.1"
</syntaxhighlight>
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>

Latest revision as of 17:35, 4 March 2018

Source

Moved to GitHub.

Cron

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`;