mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-07 12:29:37 +00:00
backup-upload: support date & time in filename
This commit is contained in:
parent
d54a0d541d
commit
0382a368ec
2 changed files with 5 additions and 1 deletions
|
|
@ -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" . "-" . $Clock->"gmt-offset") "" ] ) ];
|
||||
:local FilePath ($DirName . "/" . $FileName);
|
||||
:local BackupFile "none";
|
||||
:local ExportFile "none";
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue