All Projects → beeyev → Mikrotik-RouterOS-automatic-backup-and-update

beeyev / Mikrotik-RouterOS-automatic-backup-and-update

Licence: MIT license
Script sends backups to email and keep your mikrotik firmware up to date.

Programming Languages

RouterOS Script
5 projects

Projects that are alternatives of or similar to Mikrotik-RouterOS-automatic-backup-and-update

aws-s3-backup
This app allows you to use AWS (Amazon Web Services) S3 as backup system for desktop environments. 🚀
Stars: ✭ 67 (-75.09%)
Mutual labels:  backup-script
aws-lambda-ebs-backups
Python scripts to be run using AWS's Lambda service to Backup and Delete Snapshots of EBS Volumes
Stars: ✭ 31 (-88.48%)
Mutual labels:  backup-script
VestaCP-Sync-Backups-To-Mega
VestaCP: uploading backups to the MEGA cloud
Stars: ✭ 17 (-93.68%)
Mutual labels:  backup-script
raptor
The definitive EasyEngine installer with fully functional backup-restore and SFTP functionalities included
Stars: ✭ 26 (-90.33%)
Mutual labels:  backup-script
gitlab-mattermost-backup
A simple backup script for mattermost in gitlab omnibus package
Stars: ✭ 23 (-91.45%)
Mutual labels:  backup-script
Network-Attached-Storage-NAS-Box-using-Raspberry-Pi
Network Attached Storage (NAS) Box using Raspberry Pi allows you to install comprehensive applications and services on your Raspberry Pi, whenever you need them.
Stars: ✭ 19 (-92.94%)
Mutual labels:  backup-script
linux-android-backup
Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.
Stars: ✭ 119 (-55.76%)
Mutual labels:  backup-script
fullmetalupdate
FullMetalUpdate Python client application.
Stars: ✭ 19 (-92.94%)
Mutual labels:  firmware-update
kube-dump
Backup a Kubernetes cluster as a yaml manifest
Stars: ✭ 142 (-47.21%)
Mutual labels:  backup-script
butdr
Backup to Cloud( Google Drive, Dropbox ... ) use rclone
Stars: ✭ 49 (-81.78%)
Mutual labels:  backup-script
bash-backup
Simple backup script for GNU/Linux servers
Stars: ✭ 76 (-71.75%)
Mutual labels:  backup-script
virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (-76.95%)
Mutual labels:  backup-script
aws-lambda-backup
AWS Lambda script to create and remove snapshots of EBS volumes.
Stars: ✭ 39 (-85.5%)
Mutual labels:  backup-script
auto-mysql-backup
a wrapper for automysqlbackup
Stars: ✭ 19 (-92.94%)
Mutual labels:  backup-script
mbkp
Mikrotik backup script | simple bash script for doing encrypted backups of mikrotik devices(Routeros) via ssh. Script will do password-protected binary and encrypted with openssl export on regular basis
Stars: ✭ 21 (-92.19%)
Mutual labels:  mikrotik-backup-script
vpsbackup
VPS Backup Script
Stars: ✭ 15 (-94.42%)
Mutual labels:  backup-script
WebServerCloudBackups
Automatic backups your web projects bases and files to the clouds via WebDAV.
Stars: ✭ 20 (-92.57%)
Mutual labels:  backup-script
MailcowBackup
Script to backup/restore Mailcow and the host system using borgbackup. Handles 503 error page generation, mailflow stop/restart, SQL database dump, borg backup and prune and integrates with Logwatch for easy monitoring.
Stars: ✭ 28 (-89.59%)
Mutual labels:  backup-script
pgsql-backup
PostgreSQL Backup Script. Ported from AutoMySQLBackup.
Stars: ✭ 24 (-91.08%)
Mutual labels:  backup-script
s3-mongo-backup
Mongodb backups to S3
Stars: ✭ 18 (-93.31%)
Mutual labels:  backup-script

Mikrotik RouterOS automatic backup and update

This script provides an ability to create Mikrotik's daily backups to email. You can also enable automatic RouterOS upgrade or leave only notifications about new firmware versions.

💡 If you have any ideas about the script or you just want to share your opinion, you are welcome to Discussions, or you can open an issue if you found a bug.

Features:

  • Ability to choose script operating mode according to your needs. (Read below)
  • Script creates backups of the whole system and exported config.
  • You can set a preferred update channel.
  • If automatic updates are enabled, you can set script to install only patch versions of RouterOS updates. This means if the current RouterOS version is v6.43.6, the script will automatically install v6.43.7 (new patch version) but not v6.44.0 (new minor version), for example.
  • Script includes primary information about the device into the email message. So you can easily find the backup you need among multiple devices.
  • For safety purposes, an automatic update process will not be started if script could not send backups to email.
  • Routerboard firmware can be automatically upgraded according to the installed RouterOS version.

Script operating modes:

Backups only - script creates system and config backups and sends them to specified email as an attachment. Using email account as storage for your backups.
Backups and notifications about new RouterOS release - Except backups, script also checks for new RouterOS firmware release and provides this information in the email.
Backups and automatic RouterOS upgrade - Script makes a backup, then checks for new RouterOS version, and if new firmware released, script will initiate upgrade process. By the end, you receive two emails. The first one contains system backups of the previous RouterOS version, the second message will be sent when the upgrade process is done (including backups of the updated system).

How to use

❗️ Important
Make sure that your device identity does not contain any spaces or specific symbols! System -> Identity

1. Configure parameters

Take the script and configure it's parameters at the begining of the file.
This is not difficult because all parameters are well commented.
Important! Don't forget to provide correct email address for backups and pay attention a scriptMode variable.

2. Create new script

System -> Scripts [Add]

Important! Script name has to be BackupAndUpdate
Put the script which you configured earlier into the source area.

3. Configure mail server

Tools -> Email
Set your email server parameters. If you don't have one, i recommend to use smtp2go.com service, it allows sending a thousand emails per month for free.

To check email settings, send a test message by running the following command in terminal:

/tool e-mail send to="[email protected]" subject="backup & update test!" body="It works!";
4. Create scheduled task

System -> Scheduler [Add]
Name: Backup And Update
Start Time: 03:10:00 (the start time has to be different for all your mikrotik device in a chain)
Interval: 1d 00:00:00
On Event: /system script run BackupAndUpdate;

Or you can use this command to create the task:

/system scheduler add name="Firmware Updater" on-event="/system script run BackupAndUpdate;" start-time=03:10:00 interval=1d comment="" disabled=no
5. Test the script

When everything is done, you need to make sure that the script is working correctly.
To do so, open a New Terminal and Log window in your WinBox, then run the script manually by executing this command /system script run BackupAndUpdate; in Terminal.
You will see the script working process in the log window. If the script finished without errors, check your email, there is a fresh message with backups from your MikroTik waiting for you 🎉

Contributors

License

The MIT License (MIT). Please see License File for more information.


If you love this project, please consider giving me a

Buy me a coffee!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].