Config V2 Group Scheduled Backup Logs #426
-
Hi, I'm using configuration V2 in order to take advantage of groups and scheduled backups for those groups, which works wonderfully, but... I cannot figure out how to get the scheduled group backup to record a log file per profile. My working v1 lines are commented out in my example below. I tried adding those same lines within the Here's my current # https://creativeprojects.github.io/resticprofile/
---
version: 2
global:
default-command: snapshots
initialize: false
priority: low
min-memory: 100
log: 'logs/{{ .Profile.Name }}_{{ .Now.Format "2006-01-02T15-04-05" }}.log'
schedule-defaults:
log: 'logs/scheduled-{{ .Profile.Name }}_{{ .Now.Format "2006-01-02T15-04-05" }}.log'
groups:
groupname:
profiles:
- local
- remote
schedules:
backup:
at: "01:00"
permission: user
profiles:
default:
password-file: "~/.restic-pass"
local:
inherit: default
repository: "local:/nfs/backups/restic"
backup:
verbose: true
source:
- "backup-sources"
- etc...
tag:
- nas
exclude-caches: true
one-file-system: true
# run every day at 1:00 am
# schedule: "*-*-* 01:00:00"
# schedule-permission: user # "system" requires sudo
# schedule-log: '{{ tempFile "backup-local.log" }}'
# run-finally: 'cp {{ tempFile "backup-local.log" }} logs/restic-local_{{ .Now.Format "2006-01-02T15-04-05" }}.log'
check-before: true
retention:
before-backup: false
after-backup: true
# keep-hourly: 1
keep-daily: 7
keep-weekly: 4
keep-monthly: 12
keep-yearly: 7
prune: true
check:
# Weekday is an integer from 0 to 6 (starting from Sunday)
# Nice trick to add 1 to an integer: https://stackoverflow.com/a/72465098
read-data-subset: '{{ len (printf "a%*s" .Now.Weekday "") }}/7'
remote:
inherit: default
repository: "b2:backblazebucket:"
option: "b2.connections=12"
env:
B2_ACCOUNT_ID: ""
B2_ACCOUNT_KEY: ""
backup:
verbose: true
source:
- "backup-sources"
- etc...
tag:
- backblaze
exclude-caches: true
one-file-system: true
# run every day at 2:00 am
# schedule: "*-*-* 03:00:00"
# schedule-permission: user # "system" requires sudo
# schedule-log: '{{ tempFile "backup-remote.log" }}'
# run-finally: 'cp {{ tempFile "backup-remote.log" }} logs/restic-remote_{{ .Now.Format "2006-01-02T15-04-05" }}.log'
check-before: true
retention:
before-backup: false
after-backup: true
# keep-hourly: 1
keep-daily: 7
keep-weekly: 4
keep-monthly: 12
keep-yearly: 7
prune: true
check:
# Weekday is an integer from 0 to 6 (starting from Sunday)
# Nice trick to add 1 to an integer: https://stackoverflow.com/a/72465098
read-data-subset: '{{ len (printf "a%*s" .Now.Weekday "") }}/7' This was the closest I got, by adding some schedule setting in the
Any clues how to get individual logs per profile would be helpful. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's right, the system doesn't really support that (yet). I'll add it to the list 😆 Thanks for your report. |
Beta Was this translation helpful? Give feedback.
That's right, the system doesn't really support that (yet).
I'll add it to the list 😆
Thanks for your report.