You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The schedule-log parameter in my profile contains variables, for including the date in the log file name (e.g. {{ .Now.Format "2006-01-02" }}). Unfortunately, this variable is parsed during creation of the scheduled backup job, and not every time the scheduled job is executed. Therefore, the name of the log file will include the date when the scheduled job was created, and not the actual execution time stamp.
Question/Issue
Is it possible to parse variables during runtime of the backup job, instead of the time where the backup job was scheduled?
Therefore, the "data" variable in for the --log is lost and replaced by a static value, namely 2024-03-01. Consequently, if the backup job is executed later on, e.g. on April 15, the log file will still remain schedule-myprofile-2024-03-01.log.
The text was updated successfully, but these errors were encountered:
Summary
The
schedule-log
parameter in my profile contains variables, for including the date in the log file name (e.g.{{ .Now.Format "2006-01-02" }}
). Unfortunately, this variable is parsed during creation of the scheduled backup job, and not every time the scheduled job is executed. Therefore, the name of the log file will include the date when the scheduled job was created, and not the actual execution time stamp.Question/Issue
Is it possible to parse variables during runtime of the backup job, instead of the time where the backup job was scheduled?
Details
Let's assume my profiles.yaml file is as follows:
Let's assume I executed
resticprofile -n myprofile schedule
on March 1, 2024. On Windows, this would create the following scheduled task:Therefore, the "data" variable in for the
--log
is lost and replaced by a static value, namely2024-03-01
. Consequently, if the backup job is executed later on, e.g. on April 15, the log file will still remainschedule-myprofile-2024-03-01.log
.The text was updated successfully, but these errors were encountered: