Mikrotik Backups Via Email

Mikrotik Backup via email..
Sending yourself a Mikrotik Backup file via email is quite simple and straight forwaord with this script. You may wonder why? well if you are an IT professional installing many Mikrotik Routers you may want an up to date backup on a regular schedule so that you may restore or replace backups when others are manipulating systems or you yourself make a mistake when working on systems and forot to backup manualy. Regardless of your intentions here is the easy way out.
Open System / Scripts
Creat a new script and call it Backup_offsite
REMEMBER TO CHANGE THE EMAIL ADDRESS IN THE SCRIPT
In the script window paste this:-
:global systeminfobackup ([/system identity get name] . " Mikrotik-Backup " . [/system resource get board-name] . " " . [/system resource get version]. " " . [/system routerboard get serial-number])
:global systeminfoexport ([/system identity get name] . " Mikrotik-Export " . [/system resource get board-name] . " " . [/system resource get version]. " " . [/system routerboard get serial-number])
/system backup save name="$systeminfobackup"
/export file "$systeminfoexport"
/export verbose file "$systeminfoexport-verbose"
/tool e-mail send to="youremail@somewhere.com" subject=("$systeminfoexport") file="$systeminfoexport.rsc";
:log info "Backup & export email's sent."
Do not forget to change the email on the second last line to your email address or the one you wish it delivered to.
Apply this script and you have now created a backup and emailed it to the email listed.
Always open the log windo when testing Scripts as you will have visual aknowledgement of the success or failure.
Once you know the script is working and you recieved it via email you can now automate the task.
Open Sytem / Scheduler
Create a new schedule,
Name it Backup Email
In the schedule window type in the name of the script your created "Exactly" as it is.
Backup_Offsite
now in the interval section of the schedule put in the frequency you wish to recieve the backups via email, say in my case 72hours. When you apply you will see it automatically cahnges to 3 days in the interval window.
You have now completed automated email backups for your system.
No photo description available.
 
 
 
  • MIKROTIK, Mikrotik email, MIKROTIK ROUTER OS, Mikrotik Backups
  • 423 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Related Articles

Mikrotik Email

Email setup and configuration. Mikrotik Tools / Email Sending email through mikrotik...

Mikrotik Netwatch

Mikrotik Netwatch.. An easier explanation and example. Say you are an IT provider of sorts...

Mikrotik Winbox crashes after opening

Mikrotik Winbox opens then crashes, may show CPE in quickbox then close, you may be...

Mikrotik Dual WAN with Redundancy

Mikrotik Dual WAN with AUTO Failover using ETH5 as the main and ETH4 as the Failover....

Mikrotik IKE2 NORD VPN Setup

MikroTik IKEv2 setup with NordVPN Share this answer These instructions are based on a tutorial...