Difference between revisions of "NOC:ctwug backup"
From CTWUG Wiki
Bigmikedavis (talk | contribs) |
Bigmikedavis (talk | contribs) (→Dependencies) |
||
Line 2: | Line 2: | ||
== Dependencies == | == Dependencies == | ||
+ | * email address: backup@ctwug.za.net | ||
+ | * email server : 172.18.55.25 | ||
== Script == | == Script == |
Revision as of 21:31, 17 November 2012
Contents
Purpose
Dependencies
- email address: backup@ctwug.za.net
- email server : 172.18.55.25
Script
:local fid [/system identity get name] :local fserial [/system routerboard get serial-number] :if ( [/file find name=ctwug-auto.backup] != "" ) do=[/file remove ctwug-auto.backup] :delay 1 /system backup save name=ctwug-auto :local fwait 1 :local fcnt 0 :while ( $fwait = 1 ) do={ :set fcnt ($fcnt+1) :log info ("ctwug_backup sleep ".$fcnt) :delay 1 if ([/file find name=ctwug-auto.backup] != "") do={ :set fwait 0; } if ( $fcnt = 20) do={ :log info "ctwug_backup FAILED"; :set fwait 0; }; }; :local femail backup@ctwug.za.net :local fserver 172.18.55.25 /tool e-mail send server=$fserver from=$femail to=$femail subject="$fid/$fserial" file=ctwug-auto.backup