mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
backup-partition: add a scheduler in backup...
... that logs a warning when backup is booted.
This commit is contained in:
parent
77ef9b2c95
commit
0694d9af3e
2 changed files with 9 additions and 0 deletions
|
@ -31,7 +31,11 @@ $ScriptLock $0;
|
|||
:local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
|
||||
|
||||
:do {
|
||||
/system/scheduler/add start-time=startup \
|
||||
name=("running-from-" . $FallbackTo) \
|
||||
on-event=(":log warning \"Running from partition '" . $FallbackTo . "'!");
|
||||
/partitions/save-config-to $FallbackTo;
|
||||
/system/scheduler/remove ("running-from-" . $FallbackTo);
|
||||
$LogPrintExit2 info $0 ("Saved configuration to partition '" . \
|
||||
$FallbackTo . "'.") false;
|
||||
} on-error={
|
||||
|
|
|
@ -15,6 +15,10 @@ This script saves the current configuration to fallback
|
|||
For this to work you need a device with sufficient flash storage that is
|
||||
properly partitioned.
|
||||
|
||||
To make you aware of a possible issue a scheduler logging a warning is
|
||||
added in the backup partition's configuration. You may want to use
|
||||
[log-forward](log-forward.md) to be notified.
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
|
@ -39,6 +43,7 @@ See also
|
|||
* [Upload backup to Mikrotik cloud](backup-cloud.md)
|
||||
* [Send backup via e-mail](backup-email.md)
|
||||
* [Upload backup to server](backup-upload.md)
|
||||
* [Forward log messages via notification](log-forward.md)
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](../README.md)
|
||||
|
|
Loading…
Reference in a new issue