do checks only every n-th run #18

Closed
opened 2018-01-05 05:33:50 +00:00 by import_bot · 8 comments
Collaborator

It would be nice if one could configure borgmatic to e.g. check the repository every time, but do the lengthy archive-checks only every n-th time, or every week or s.th. like that.


Imported from Taiga issue 17 (done). Created on 2016-03-16T17:39:04+0000 by Stefan L.

It would be nice if one could configure borgmatic to e.g. check the repository every time, but do the lengthy archive-checks only every n-th time, or every week or s.th. like that. --- Imported from Taiga issue 17 (done). Created on 2016-03-16T17:39:04+0000 by Stefan L.
Author
Collaborator

That's a great idea. It would require storing a little state about how far along until the next check, but that could happen.


Comment on 2016-04-10T22:31:38+0000 by Dan Helfman.

That's a great idea. It would require storing a little state about how far along until the next check, but that could happen. --- Comment on 2016-04-10T22:31:38+0000 by Dan Helfman.
Author
Collaborator

I also would like to see some options around checks. I want to be able to do fast backups through the week and check them once a week. Any added flexibility around this option would be great. As for state a simple sqlite db could be ideal.


Comment on 2016-06-09T17:33:31+0000 by Dennis Roberts.

I also would like to see some options around checks. I want to be able to do fast backups through the week and check them once a week. Any added flexibility around this option would be great. As for state a simple sqlite db could be ideal. --- Comment on 2016-06-09T17:33:31+0000 by Dennis Roberts.
Author
Collaborator

Another interesting idea: In https://tree.taiga.io/project/witten-borgmatic/issue/30 Markus Hubig suggested a borgmatic "check only" mode that would allow you to separately run borgmatic from cron / your job scheduler, just to do checks. That way, you could run checks at whatever frequency you wanted.

To make this useful, we'd also need an "exclude checks" flag or similar for the normal mode.

Thoughts on that approach, versus the request in this ticket?


Comment on 2017-07-29T03:44:52+0000 by Dan Helfman.

Another interesting idea: In https://tree.taiga.io/project/witten-borgmatic/issue/30 Markus Hubig suggested a borgmatic "check only" mode that would allow you to separately run borgmatic from cron / your job scheduler, just to do checks. That way, you could run checks at whatever frequency you wanted. To make this useful, we'd also need an "exclude checks" flag or similar for the normal mode. Thoughts on that approach, versus the request in this ticket? --- Comment on 2017-07-29T03:44:52+0000 by Dan Helfman.
Author
Collaborator

That would work for my purpose just fine.


Comment on 2017-07-29T03:53:33+0000 by Dennis Roberts.

That would work for my purpose just fine. --- Comment on 2017-07-29T03:53:33+0000 by Dennis Roberts.
Author
Collaborator

Okay, just released borgmatic 1.1.4 with three new flags: "--prune", "--create", and "--check".

So you can configure one cron/Jenkins job with "--prune --create" and a separate job with a different frequency with just "--check". Or mix and match those flags how ever you like.


Comment on 2017-07-29T05:07:39+0000 by Dan Helfman.

Okay, just released borgmatic 1.1.4 with three new flags: "--prune", "--create", and "--check". So you can configure one cron/Jenkins job with "--prune --create" and a separate job with a different frequency with just "--check". Or mix and match those flags how ever you like. --- Comment on 2017-07-29T05:07:39+0000 by Dan Helfman.
Author
Collaborator

I should have stated exactly what I do now:

borg check -v --last 7 borg@borgserver:repo and then I do borg extract -v --dry-run --list borg@borgserver:repo::last_archive

The check you know just does a high level verification.

The extract dry-run actually reads each file into memory and verifies its consistency - this is the only way to check for bit rot without doing a real restore.

So I guess my ask is that the --check option can be configured via the configuration file on what exactly to do.

EDIT: When I first wanted this feature originally I wasn't aware of the extract dry-run option


Comment on 2017-07-29T05:16:48+0000 by Dennis Roberts.

I should have stated exactly what I do now: borg check -v --last 7 borg@borgserver:repo and then I do borg extract -v --dry-run --list borg@borgserver:repo::last_archive The check you know just does a high level verification. The extract dry-run actually reads each file into memory and verifies its consistency - this is the only way to check for bit rot without doing a real restore. So I guess my ask is that the --check option can be configured via the configuration file on what exactly to do. EDIT: When I first wanted this feature originally I wasn't aware of the extract dry-run option --- Comment on 2017-07-29T05:16:48+0000 by Dennis Roberts.
Author
Collaborator

There's already a check_last option in the borgmatic config file, so the check portion should already be possible. I can look into optionally adding the dry-run portion though. Filed as #35.


Comment on 2017-07-29T05:22:56+0000 by Dan Helfman.

There's already a check_last option in the borgmatic config file, so the check portion should already be possible. I can look into optionally adding the dry-run portion though. Filed as #35. --- Comment on 2017-07-29T05:22:56+0000 by Dan Helfman.
Author
Collaborator

Okay, just released borgmatic 1.1.5 with a new optional "extract" check in the consistency section of configuration. That should handle your dry-run use case.


Comment on 2017-07-30T18:20:00+0000 by Dan Helfman.

Okay, just released borgmatic 1.1.5 with a new optional "extract" check in the consistency section of configuration. That should handle your dry-run use case. --- Comment on 2017-07-30T18:20:00+0000 by Dan Helfman.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#18
No description provided.