resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

Scheduling a group has unexpected results

Open WebSpider opened this issue 1 year ago • 2 comments

I realise the v2 config format being not-standard yet may have something to do with this, but I cannot seem to schedule a group backup/prune. Maybe I'm doing something wrong, maybe not. I'm looking to use this feature so the two jobs run in sequence: First make a backup of the DB, then make a backup of the files for the app, right after.

version: 2

groups:
  mygroup:
    description: Database and file backup of App
    profiles:
      - app-database
      - app-files
    schedules:
      backup:
        at: "05:00"
        schedule-permission: user
      prune:
        at: monthly
        schedule-permission: user
profiles:
  default:
    <all my defaults go here>
  app-database:
    inherit: default
    backup:
      run-before: my-db-dump-script.sh
      run-after: my-db-dump-cleanup-script.sh
      source: my-db-dump-dir
    prune:
      max-unused: "3%"
  app-files:
    inherit: default
    exclude-file: files.exclude
    source:
      - /path/1
      - /path/2

When I then inpect what's going on, when I use resticprofile profiles it shows the 3 profiles and the group, but I cannot show, or status the group, because it is not a profile, and I cannot schedule the group, because the group has a schedule connected to it, and not the profiles.

When I move the schedule to the profiles, it works. But then I need to time how long it takes for my DB dump to complete, instead of chaining the profiles together.

WebSpider avatar Jul 05 '24 12:07 WebSpider

This is right, scheduling on v2 is not finished yet. That's the last part to do, we're almost there 😉

In the meantime, if you use resticprofile locks with a long waiting time, you should be able to do both backup without breaking the restic repository

creativeprojects avatar Jul 05 '24 15:07 creativeprojects

You mean use the same lockfile for both backups? That might be a nice solution indeed. I'll try that!

WebSpider avatar Jul 08 '24 09:07 WebSpider

Scheduling of groups is coming soon 😉 https://github.com/creativeprojects/resticprofile/pull/418

creativeprojects avatar Oct 21 '24 17:10 creativeprojects

Finally released in version 0.29.0

creativeprojects avatar Oct 28 '24 16:10 creativeprojects