mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-10 05:42:13 +00:00
backup-email: support date & time in filename
This commit is contained in:
parent
174e16502a
commit
d54a0d541d
2 changed files with 5 additions and 1 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" . "-" . $Clock->"gmt-offset") "" ] ) ];
|
||||
: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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue