check --repair for an specific repository #446

Closed
opened 2021-09-06 06:55:16 +00:00 by hrv231 · 11 comments

What I'm trying to do and why

I deleted some of my files of one repo by mistake, was able to restore them, but for some reason the repo has some problems.
I wanted to do something like "borgmatic check --repository /mnt/myrepo --repair" but obviously it doesn't work.

Steps to reproduce (if a bug)

I would like this feature on the cli to be added if possible please.

Expected behavior (if a bug)

Expected to be able to do a check --repair to one specific repository.

Other notes / implementation ideas

On the documentation I don't see a way to run borgmatic check for an specific repo, supposed I have more than repo, using the guide "Make per-application backups".

Is there any way to include a way to specify on the cli with borgmatic an specific repository?
If not, can you add that as a feature?

Environment

borgmatic version: [1.5.12]

borgmatic installation method: [Docker container]

Borg version: [1.1.15]

Python version: [3.8.10]

#### What I'm trying to do and why I deleted some of my files of one repo by mistake, was able to restore them, but for some reason the repo has some problems. I wanted to do something like "borgmatic check --repository /mnt/myrepo --repair" but obviously it doesn't work. #### Steps to reproduce (if a bug) I would like this feature on the cli to be added if possible please. #### Expected behavior (if a bug) Expected to be able to do a check --repair to one specific repository. #### Other notes / implementation ideas On the documentation I don't see a way to run borgmatic check for an specific repo, supposed I have more than repo, using the guide "Make per-application backups". Is there any way to include a way to specify on the cli with borgmatic an specific repository? If not, can you add that as a feature? #### Environment **borgmatic version:** [1.5.12] **borgmatic installation method:** [Docker container] **Borg version:** [1.1.15] **Python version:** [3.8.10]

How do you maintain your multiple, per-app backups? If using individual YAML files, like in my case, you should be able to 1. make BorgMatic run with that config file and hence repo only and 2., issue arbitrary Borg commands as well. Look at the following example:

borgmatic --config ~/.config/borgmatic.d/[...].yaml --verbosity 2 borg info
borgmatic --config ~/.config/borgmatic.d/[...].yaml --verbosity 2 borg delete --first 1 --stats
How do you maintain your multiple, per-app backups? If using individual YAML files, like in my case, you should be able to 1. make BorgMatic run with that config file and hence repo only and 2., issue arbitrary Borg commands as well. Look at the following example: ```bash borgmatic --config ~/.config/borgmatic.d/[...].yaml --verbosity 2 borg info borgmatic --config ~/.config/borgmatic.d/[...].yaml --verbosity 2 borg delete --first 1 --stats ```
Author

Thanks for your example.

I tried to do it but it gives me this error, maybe it is because I'm running it on a docker container ?

So, after seeing the error with borgmatic --config location/.yaml borg info , I decided to try it without the "borg" and it is working.

Can you tell me why I'm not able to run arbitrary Borg commands ? is it because of the version I'm running?

image

Thanks for your example. I tried to do it but it gives me this error, maybe it is because I'm running it on a [docker container](https://hub.docker.com/r/b3vis/borgmatic/) ? So, after seeing the error with `borgmatic --config location/.yaml borg info` , I decided to try it without the "borg" and it is working. Can you tell me why I'm not able to run arbitrary Borg commands ? is it because of the version I'm running? ![image](/attachments/215a18f7-5cb5-47c6-82b3-aeded0fb8ca4)
293 KiB

Can you tell me why I'm not able to run arbitrary Borg commands ? is it because of the version I'm running?

Would have been of help if you had provided the version your are running. :-) But yes, to me it looks like your version is simply too old. borg is not part of the valid arguments printed in your screenshot.

(No borg action in borgmatic? Time to upgrade!)

https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/

> Can you tell me why I'm not able to run arbitrary Borg commands ? is it because of the version I'm running? Would have been of help if you had provided the version your are running. :-) But yes, to me it looks like your version is simply too old. `borg` is not part of the valid arguments printed in your screenshot. > (No borg action in borgmatic? Time to upgrade!) https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/
Author

Version of borgmatic and borg is on the ticket, at the beginning :-)
version 1.5.12

That version is like 8 months old, do you think that it, or it might be something with the docker from https://hub.docker.com/r/b3vis/borgmatic/

Version of borgmatic and borg is on the ticket, at the beginning :-) version 1.5.12 That version is like 8 months old, do you think that it, or it might be something with the docker from https://hub.docker.com/r/b3vis/borgmatic/

Seems to have been introduced with 1.5.15:

#425: Run arbitrary Borg commands with new "borgmatic borg" action. See the documentation
for more information: https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/

cf8882f2bc

Seems to have been introduced with 1.5.15: > #425: Run arbitrary Borg commands with new "borgmatic borg" action. See the documentation > for more information: https://torsion.org/borgmatic/docs/how-to/run-arbitrary-borg-commands/ https://projects.torsion.org/witten/borgmatic/commit/cf8882f2bcde934119c375997e2cbefe5f35f96a
Owner

Can confirm! The borgmatic borg action was added in borgmatic 1.5.15. So upgrading would certainly be a decent work-around right now. But I agree that a --repository flag to the check action would be helpful.

And thanks @ams_tschoening for jumping in on this ticket.

Can confirm! The `borgmatic borg` action was added in borgmatic 1.5.15. So upgrading would certainly be a decent work-around right now. But I agree that a `--repository` flag to the `check` action would be helpful. And thanks @ams_tschoening for jumping in on this ticket.
Author

Thank you both, I'll upgrade asap.

Thank you both, I'll upgrade asap.
Owner

Reopening for the --repository flag on check! That still seems useful to me, even if there's a work-around.

Reopening for the `--repository` flag on `check`! That still seems useful to me, even if there's a work-around.
witten reopened this issue 2021-09-09 03:54:02 +00:00
Owner

Related/overlapping ticket: #564.

Related/overlapping ticket: #564.
witten added the
good first issue
label 2023-02-04 17:45:36 +00:00
Collaborator

@witten so this can be closed now that #564 is closed?

@witten so this can be closed now that #564 is closed?
Owner

Yes, thank you!

Yes, thank you!
Sign in to join this conversation.
No Milestone
No Assignees
4 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#446
No description provided.