Update README.md

Pay attention to "execute the script by typing `/system script run BackupAndUpdate;` in the Terminal." i might have messed with the command as i don't really know how ' " / works ❤️
This commit is contained in:
deniska-666 2024-03-23 13:37:44 +01:00 committed by GitHub
parent 0aaca7eda2
commit 4bd912658b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,29 +16,29 @@ ## Features:
- Routerboard firmware can be upgraded automatically based on 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).
**Backups only** - The script generates system and configuration backups and forwards them to a specified email as attachments. It uses your email account as a storage for these backups.
**Backups and notifications about new RouterOS release** - In addition to creating backups, the script also monitors for any new releases of RouterOS firmware and communicates this information via email.
**Backups and automatic RouterOS upgrade** - The script begins by creating a backup, followed by a check for any new versions of RouterOS. If a newer firmware version is detected, the script initiates the upgrade process. Upon completion, two emails are sent: the first includes the system backups from the prior RouterOS version, and the second, sent post-upgrade, contains backups of the updated system.
## How to use
> ❗️ **Important**
> Ensure your device identity is free from spaces and special characters! `System -> Identity`
> Ensure your device identity does not contain spaces and special characters! `System -> Identity`
##### 1. Configure parameters
Take the [script](https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update/raw/master/BackupAndUpdate.rsc) and configure it's parameters at the begining of the file.
This is not difficult because all parameters are well commented.
This step is straightforward as all parameters are well-commented.
**Important!** Don't forget to provide correct email address for backups and pay attention to `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.
**Important!** Script name must be `BackupAndUpdate`
Insert the script which you configured earlier into the source area.
![](https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update/raw/master/howto/script-name.png)
##### 3. Configure mail server
Tools -> Email
Set your email server parameters. If you don't have one, i recommend to use [smtp2go.com](https://smtp2go.com "smtp2go.com") service, it allows sending a thousand emails per month for free.
Configure your email server parameters. If you don't have one, i recommend using the [smtp2go.com](https://smtp2go.com "smtp2go.com") service, which allows sending a thousand emails per month for free.
![](https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update/raw/master/howto/email-config.png)
To check email settings, send a test message by running the following command in terminal:
@ -49,7 +49,7 @@ ##### 3. Configure mail server
##### 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)
Start Time: `03:10:00` (the start time has to be different for all your mikrotik devices in a chain)
Interval: `1d 00:00:00`
On Event: `/system script run BackupAndUpdate;`
![](https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update/raw/master/howto/scheduler-task.png)
@ -59,9 +59,14 @@ ##### 4. Create scheduled 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 🎉
Once everything is set up, it's important to verify that the script is functioning properly.
To do this, open a New Terminal and a Log window in your WinBox, then manually execute the script by typing `/system script run BackupAndUpdate;` in the Terminal.
You will see the script the script's operation in the log window. If the script completes without any errors, check your email. You'll find a new message with backups from your MikroTik awaiting you. 🎉
## Contributors