User Tools

Site Tools


networking:router:mikrotik_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:router:mikrotik_backup [2020/05/12 09:02]
gcooper
networking:router:mikrotik_backup [2022/11/22 14:25] (current)
gcooper
Line 15: Line 15:
 ===== Automated Backup ===== ===== Automated Backup =====
  
-{{:networking:router:mikrotik_email_settings.png?direct&200 |E-Mail Settings}} {{:networking:router:mikrotik_makebackup_script.png?direct&300 |makebackup Script}}+{{:networking:router:mikrotik_email_settings.png?direct&300 |E-Mail Settings}} {{:networking:router:mikrotik_makebackup_script.png?direct&500 |makebackup Script}}
  
 ==== E-Mail Settings ==== ==== E-Mail Settings ====
Line 28: Line 28:
 :local emailusername "validusername"; :local emailusername "validusername";
 :local emailpassword "validpassword"; :local emailpassword "validpassword";
-:local emailport "587"; 
  
 /tool e-mail set from="$emailfrom" address="$emailserverip"\ /tool e-mail set from="$emailfrom" address="$emailserverip"\
-   port="$emailport" start-tls=yes user="$emailusername" password="$emailpassword";+   port=587 tls=starttls user="$emailusername" password="$emailpassword";
 </file> </file>
  
Line 42: Line 41:
 :put "Backing up $SYSname"; :put "Backing up $SYSname";
 /system backup save name="$SYSname"; /system backup save name="$SYSname";
 +/export file="$SYSname";
 :log info "Backup pausing for 10s"; :log info "Backup pausing for 10s";
 :delay 10s; :delay 10s;
 :log info "Finished backing up configuration, sending e-mail"; :log info "Finished backing up configuration, sending e-mail";
-/tool e-mail send to="router@sonoracomm.comstart-tls=yes subject=($SYSname . " backup"file=($SYSname . ".backup");+:local files {($SYSname . ".backup");($SYSname . ".rsc")}; 
 +/tool e-mail send to="you@yourdomain.tld" tls=starttls subject=($SYSname . " backup"
 +  body="See attached backup files.file=$files;
 :log info "Backup pausing for 10s"; :log info "Backup pausing for 10s";
 :delay 10s; :delay 10s;
Line 51: Line 53:
 :put "Removing backup file"; :put "Removing backup file";
 /file remove ($SYSname . ".backup"); /file remove ($SYSname . ".backup");
 +/file remove ($SYSname . ".rsc");
 :log info "Finished Backup Script"; :log info "Finished Backup Script";
 </file> </file>
networking/router/mikrotik_backup.1589295747.txt.gz · Last modified: 2020/05/12 09:02 by gcooper