Question on Schedules in v2: How to schedule them (v0.23)? And some extra questions
Hi,
I really like the new v2 format, and resticprofile in general. I see Fred and jkellerer are working actively on schedule-v2, so possibly I just need patience. (?) But probably its just that I cannot find the right way to trigger the command, hence this question. I'll probably end up scheduling it manually until the format stabilized, but I figured it doesn't hurt asking.
Question
My question: Is it possible in v0.23.0 to use the schedule section? If so, how do I ask resticprofile to schedule it? I have schedules working when I add them to the profile, but not when adding to the new schedules root-section.
What I'm trying to achieve:
I would like to have one task that runs the backups sequentially to avoid getting into unnecessary self-lock issues (with the forget) and to avoid spamming HDD with concurrent requests from the same PC. So I want all my 'daily' backups to run sequentially, and all my hourly backups to run sequentially (though I have only one of those at the momement). So two TaskScheduler tasks, 1 daily and 1 hourly. The v2-schedules seem perfect for this (to avoid my own custom *.ps1 scripts and managing tasks myself directly).
Commands
Commands that work, but the schedule commands ONLY work when i have schedule subsection under root.backup. If I remove that schedule section in the believe that my root schedules section should work, it does not work
-
.\resticprofile.exe -c test.yaml maindrives.backup -
.\resticprofile.exe -c test.yaml maindrives.schedule- This will schedule individual
-
.\resticprofile.exe -c test.yaml schedule --all- This will schedule all including my root
Commands that does not work:
-
.\resticprofile.exe -c test.yaml maindrives.schedule
Configuration
This is my profile.yaml file (I have cleaned it to remove what I deemed irrelevant, and tested this test-file):
version: "2"
profiles:
root:
password-file: "restic-encryption-password.txt"
backup:
use-fs-snapshot: true # Note that VSS Snapshot does not work on all remote drives, such as USB-sticks
group-by: "host,tags"
exclude-if-present: .nobackup-restic
iexclude-file:
- windows.exclude
repository: "\\\\towerAdministrator\\windowsbackup\\Restic\\windows"
# Individual schedules work when this is included, inside this root.backup section:
# schedule: daily #'*:00,30'
# schedule-permission: system
# schedule-priority: background
# schedule-lock-mode: default
# schedule-lock-wait: 215m30s
# schedule-log: logs/profile-backup.log
# ----------
drivec:
inherit: root
tag:
- "C:\\"
backup:
schedule-log: logs/profile-drivec.log
source:
- "C:\\"
drived:
inherit: root
tag:
- "D:\\"
backup:
schedule-log: logs/profile-drived.log
source:
- "D:\\"
groups:
maindrives:
continue-on-error: true
profiles:
- drivec
- drived
# - development
schedules:
full: # give a name to your schedule
group: maindrives
schedule:
- "Mon..Fri *:00,15,30,45" # every 15 minutes on weekdays
permission: system
run: backup # backup is the default if not specified
Extra questions
I use inheritance, because I have not gotten mixins to work in v0.23. My root profiles also show up in the help overview .\resticprofile.exe . Is it possible to inform resticprofile that those are just for inheritance and should thus be ignored in help-overview and in schedule --all ? This does not matter much, but seems nice-to-have if using inheritance.
Would you prefer if I write stuff like this elsewhere, like on the restic-forum?
My question: Is it possible in v0.23.0 to use the schedule section? If so, how do I ask resticprofile to schedule it? I have schedules working when I add them to the profile, but not when adding to the new schedules root-section.
Sorry, the work is in progress. I know it's not going very fast but since I changed job I don't have much time in the evenings any more 😞
For now, you can use all the features of the v2 configuration but the enhanced scheduling. There's a (almost 1 year old) MR for it https://github.com/creativeprojects/resticprofile/pull/146 which requires a great deal of refactoring to make v1 and v2 available together (I don't want to break the configuration for everybody all of a sudden)
I use inheritance, because I have not gotten mixins to work in v0.23. My root profiles also show up in the help overview
.\resticprofile.exe. Is it possible to inform resticprofile that those are just for inheritance and should thus be ignored in help-overview and inschedule --all? This does not matter much, but seems nice-to-have if using inheritance.
Not right now, but that's a good idea. I'll keep it in the back of my mind 😄
Would you prefer if I write stuff like this elsewhere, like on the restic-forum?
Here is perfectly fine 😉
Thank you for your detailed description 👍🏻
Sorry, the work is in progress. I know it's not going very fast but since I changed job I don't have much time in the evenings any more 😞
I feel for you there :) I'm also stuck on low energy a lot these days, and not getting done what I want. Though in your case it might not actually be a bad thing having a full and busy day, just bad for resticprofile :)
Let me give my thanks while I have your ear. I have loved playing around with restic, and I love what resticprofile does for restic, making it configurable instead of scripts.
Thank you for letting me know, about the WIP about v2 schedules.
Might you be welcoming a pull-request on the documentation?
I'm thinking of updating this page, adding info that the schedule section is not yet available, but that the others are:
https://github.com/creativeprojects/resticprofile/blob/master/docs/content/configuration/v2/_index.md
I might also add some examples there if I find it useful, I'm not sure yet.
Ahh, so v2 being work-in-progress, is that also the reason why mix-ins doesn't work? I couldn't get those working at all, but it might be that I was just trying the v2-format. I'm not sure.
Might you be welcoming a pull-request on the documentation?
Certainly, any help is always welcome 👍🏻
Ahh, so v2 being work-in-progress, is that also the reason why mix-ins doesn't work? I couldn't get those working at all, but it might be that I was just trying the v2-format. I'm not sure.
That could be a bug, mixins should be working. What were you trying to do?
the proposed schedule section for v2 is abandoned. v1 schedules will continue to work with v2