diff --git a/backup-email.rsc b/backup-email.rsc index fcafff45..47523f74 100644 --- a/backup-email.rsc +++ b/backup-email.rsc @@ -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"; diff --git a/doc/backup-email.md b/doc/backup-email.md index cf334697..e55a0d7b 100644 --- a/doc/backup-email.md +++ b/doc/backup-email.md @@ -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`