fbpx

Can automatic backup routines be created in MikroTik?

Yes, it is possible to create automatic backup routines on MikroTik devices using RouterOS, the operating system used by these devices.

These backups are crucial to ensure that you have a copy of the device's current configuration in case of system failure or configuration errors.

We explain how you can configure these routines:

Use of Scripts and Scheduler

To automate the backup process in MikroTik, you can use the RouterOS scripting functionality combined with the Scheduler. This allows you to create a script that performs the backup and then schedule it to run at regular intervals.

Backup Script Creation

  1. Access your MikroTik device: Use WinBox or SSH access to connect to your MikroTik router.
  2. Open Terminal: From here, you can type commands directly.
  3. Write a backup script: You can create a script that saves the current system configuration. Here is an example of what this script could look like:

    /system backup save name="backup-$(/system clock get date)-$(/system clock get time)"

    This command creates a backup file with the current date and time as part of the file name, which helps identify when the backup was taken.

Schedule the Script for Automatic Execution

  1. Create a scheduled task (scheduler): After creating the script, you must schedule it to run automatically at regular intervals, such as daily or weekly.

    /system scheduler
    add name="DailyBackup" start-time=03:00:00 interval=1d on-event="/system backup save name=\"backup-\$[/system clock get date]-\$[/system clock get time]\""

    This command will schedule the script to run every day at 3:00 AM.

Additional considerations

  • Backup Storage: Consider where these backup files will be stored. Backups are saved to internal storage by default, but you could set up a system to move these files to external storage or a cloud location for added security.
  • Notifications: You can add functionality to the script to send notifications by email or through other means if that is important for your network administration.
  • Recovery Tests: It is vital to test backup recovery regularly to ensure that the backups are valid and that the recovery is working as expected.

Implementing these automatic backup routines can significantly help maintain the integrity and recoverability of your MikroTik device configuration, ensuring the continuity and stability of your network services.

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011