mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-08 12:59:37 +00:00
Merge branch 'backup-filename-date' into next
This commit is contained in:
commit
cd4052ba6b
7 changed files with 15 additions and 5 deletions
|
|
@ -16,6 +16,7 @@
|
|||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global BackupFileNameDate;
|
||||
:global BackupPassword;
|
||||
:global BackupRandomDelay;
|
||||
:global BackupSendBinary;
|
||||
|
|
@ -73,7 +74,9 @@
|
|||
|
||||
# filename based on identity
|
||||
:local DirName ("tmpfs/" . $ScriptName);
|
||||
:local FileName [ $CleanName ($Identity . "." . $Domain) ];
|
||||
:local Clock [ /system/clock/get ];
|
||||
:local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse \
|
||||
($BackupFileNameDate = true) ("-" . $Clock->"date" . "-" . $Clock->"time") "" ] ) ];
|
||||
:local FilePath ($DirName . "/" . $FileName);
|
||||
:local BackupFile "none";
|
||||
:local ExportFile "none";
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global BackupFileNameDate;
|
||||
:global BackupPassword;
|
||||
:global BackupRandomDelay;
|
||||
:global BackupSendBinary;
|
||||
|
|
@ -72,7 +73,9 @@
|
|||
|
||||
# filename based on identity
|
||||
:local DirName ("tmpfs/" . $ScriptName);
|
||||
:local FileName [ $CleanName ($Identity . "." . $Domain) ];
|
||||
:local Clock [ /system/clock/get ];
|
||||
:local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse \
|
||||
($BackupFileNameDate = true) ("-" . $Clock->"date" . "-" . $Clock->"time") "" ] ) ];
|
||||
:local FilePath ($DirName . "/" . $FileName);
|
||||
:local BackupFile "none";
|
||||
:local ExportFile "none";
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ Configuration
|
|||
|
||||
The configuration goes to `global-config-overlay`, these are the parameters:
|
||||
|
||||
* `BackupFileNameDate`: whether to add date & time in filenames
|
||||
* `BackupSendBinary`: whether to send binary backup
|
||||
* `BackupSendExport`: whether to send configuration export
|
||||
* `BackupSendGlobalConfig`: whether to send `global-config-overlay`
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ Configuration
|
|||
|
||||
The configuration goes to `global-config-overlay`, these are the parameters:
|
||||
|
||||
* `BackupFileNameDate`: whether to add date & time in filenames
|
||||
* `BackupSendBinary`: whether to send binary backup
|
||||
* `BackupSendExport`: whether to send configuration export
|
||||
* `BackupSendGlobalConfig`: whether to send `global-config-overlay`
|
||||
|
|
|
|||
|
|
@ -90,8 +90,9 @@
|
|||
# Toggle this to disable color output in terminal/cli.
|
||||
:global TerminalColorOutput true;
|
||||
|
||||
# This defines what backups to generate, the password to use,
|
||||
# and what random delay (between 0 and given seconds) to apply.
|
||||
# This defines whether to add date & time in filenames, what backups to generate,
|
||||
# the password to use, and what random delay (between 0 and given seconds) to apply.
|
||||
:global BackupFileNameDate false;
|
||||
:global BackupSendBinary false;
|
||||
:global BackupSendExport true;
|
||||
:global BackupSendGlobalConfig true;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# Git commit id & info, expected configuration version
|
||||
:global CommitId "unknown";
|
||||
:global CommitInfo "unknown";
|
||||
:global ExpectedConfigVersion 142;
|
||||
:global ExpectedConfigVersion 143;
|
||||
|
||||
# global variables not to be changed by user
|
||||
:global GlobalFunctionsReady false;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
140="The scripts 'lease-script' was renamed to 'dhcpv4-server-lease', configuration was updated automatically.";
|
||||
141="Introduced script 'dhcpv6-client-lease' to run several scripts on IPv6 DHCP client lease.";
|
||||
142="Added a setting for 'mod/notification-email' to check availability of certificate chain.";
|
||||
143="Made backup scripts 'backup-email' and 'backup-upload' support date & time in filenames.";
|
||||
};
|
||||
|
||||
# Migration steps to be applied on script updates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue