Automatically MikroTik Router Backup send to Email
To automatically backup and email the configuration of a MikroTik router, you can use the following steps:
Set up email settings:
Access the MikroTik router's web interface.
Go to the "Tools" menu and select "Email".
Configure the email settings by entering the SMTP server address, port number, authentication details, sender and recipient email addresses, and other necessary parameters. Make sure you have valid email credentials and access to an SMTP server.
Create a script:
Go to the "System" menu and select "Scripts".
Click on the "+" button to create a new script.
In the script editor, enter the following commands:
/export file=config.rsc
:delay 5s
/tool e-mail send to="[email protected]" subject="Router Configuration Backup" file=config.rsc
:delay 5s
/file remove config.rsc
Modify the email recipient address in the to="[email protected]" parameter to the desired email address where you want to receive the backup.
Save the script by clicking "Apply" or "OK".
Create a scheduler:
Go to the "System" menu and select "Scheduler".
Click on the "+" button to add a new scheduler.
Set the desired interval for the backup and email. For example, to perform the backup and email daily at 1:00 AM, set the interval to interval=1d start-time=01:00:00.
In the "On Event" field, enter the name of the script you created in the previous step, such as script-name=backup-script.
Save the scheduler by clicking "Apply" or "OK".
Test the configuration:
To test the backup and email functionality, manually run the script by going to the "System" menu, selecting "Scripts", and clicking the "Run" button next to the script you created.
Check the specified email address for the backup file. It should be sent as an attachment to the email.
Once the scheduler is enabled, the MikroTik router will automatically execute the script at the specified interval, creating a backup of the configuration file and emailing it to the specified recipient.
Please note that the above steps provide a basic outline of the process. You can customize the script and scheduler based on your specific requirements and desired backup frequency. Additionally, ensure that your router has a valid and reachable SMTP server for sending the email.
Refer to the MikroTik documentation or seek assistance from MikroTik support for further details and troubleshooting specific to your RouterOS version.
/system backup save name=email_backup
/tool e-mail send file=email_backup.backup to="[email protected]" body="Name Zila" subject="$[/system identity get name] $[/system clock get date] $[/system clock get time]"
Please My Channel and Pages follow Subscribe,Like and Share Thank You
====================================================================
1- Subscribe YouTube: I Like Pathan
https://bit.ly/40XO3O4
_________________________________________________________________________
2- Subscribe YouTube: Zila Network
https://bit.ly/3MjBNUg
_________________________________________________________________________
3- Subscribe YouTube: Zila Pathan Vlogs
https://bit.ly/4365yxJ
_________________________________________________________________________
4- follow my Facebook Page:Comedy TV
https://bit.ly/3naFnpE
_________________________________________________________________________
5- follow my Facebook Page:
https://bit.ly/3Np8fox
_________________________________________________________________________
6- TikTok Page Like and follow:
/ like_pathan
_________________________________________________________________________
7- WEB: https://zilapathan.blogspot.com/
====================================================================