-
-
Notifications
You must be signed in to change notification settings - Fork 50
New configuration format
The current file format was decided at the time resticprofile was only using the toml format. Nesting pieces of configuration in blocks is not the easiest as you have to specify the whole path in the block:
[profile]
[profile.backup]
...
Since then, I believe the yaml format is preferred over toml.
My proposal is to make a version 1 of the configuration file, the current file format is version 0. Both formats will continue to be valid (like docker-compose):
- if no version is specified, the
version 0is used. This is the current format - if a version is specified,
1being the only one accepted for now, the new format will be expected
I will show the specification using the yaml as examples. I'm not retiring the other formats.
---
version: 1The global section does not change. We'll keep all the global configuration in there.
---
global:
default-command: snapshots
initialize: false
priority: low
All your profiles will be nested under a profiles section. Please note the schedules are no longer described inside the profile, but in a separate section schedules (see following sections).
profiles:
default:
env:
tmp: /tmp
password-file: key
repository: /backup
documents:
inherit: default
backup:
source: ~/Documents
snapshots:
tag:
- documentsThe list of profiles will be nested under a profiles section, so we can add more configuration to groups later.
groups:
full: # name of your group
profiles:
- root
- documents
- mysqlA new schedule section could schedule either a group or a list of profiles.
schedules:
full-backup: # give a name to your schedule
group: full
schedule:
- "Mon..Fri *:00,15,30,45" # every 15 minutes on weekdays
permission: user
run: backup # backup is the default if not specified
other:
profiles:
- root
- mysql
schedule:
- "Sat,Sun 0,12:00" # twice a day on week-ends
permission: user
run: pruneThis format leaves more space for improvements later (like a repos section)
Does that make sense?
Please reply in the opened issue, thanks :)