fbpx

Can email backup routines be generated in MikroTik?

Yes, on MikroTik devices you can configure routines to automatically generate and send backups to an email.

This is done using MikroTik RouterOS's scripting capabilities along with its built-in email functionality.

We explain how you can configure this step by step:

Step 1: Configure SMTP Server

First, you need to configure the SMTP server on your MikroTik device so that it can send emails.

/tool e-mail
set address=smtp.example.com port=587 start-tls=yes from="[email protected]" \
    user="[email protected]" password="contraseña"

Replaces smtp.example.com, [email protected], and contraseña with the details of your own SMTP server.

Step 2: Create the Backup Script

Next, create a script that generates the backup and sends it via email. This script will create a backup file and send it to the specified email address.

/system script
add name="backup_to_email" source={
    /system backup save name="backup-\$[/system identity get name]"
    /tool e-mail send to="[email protected]" subject="Backup de MikroTik: \$[/system identity get name]" \
        file="backup-\$[/system identity get name].backup"
}

Change [email protected] by the email address to which you want to send the backup.

Step 3: Program the Script

Finally, schedule the script to run automatically at regular intervals using MikroTik's scheduler.

/system scheduler
add name="Enviar Backup Diario" start-date=jan/01/2022 start-time=03:00:00 interval=1d \
    on-event="backup_to_email"

This example configures the script to run daily at 3:00 AM. Adjust the start date, time and interval according to your needs.

Security Considerations

  • Email Security: Make sure the SMTP connection is secure using TLS to prevent credentials and data from being transmitted in the clear.
  • Data Privacy: Please note that sending backups via email may expose sensitive data. Make sure backups are encrypted or the email channel is secure.
  • Regular Verification: Regularly check that emails are being sent correctly and that backup files are not corrupted.

Setting your MikroTik device to automatically send backups via email is a great way to ensure you have regular backups of your settings, making it easy to recover in case of crashes or problems.

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