create before prune and compact? #636

Closed
opened 2023-02-09 04:36:34 +00:00 by anarcat · 3 comments

I am often running into this situation with borg that it notices a huge junk file i left around. it could be a temporary copy of a file, an ISO image i don't want, anything. Typically, it gets stuck on there for a while and, if i notice, i remove the file, kill the backup and start again.

With normal borg create, this works fine: borg will restart scanning the filesystem from scratch, but at least the chunks are already on the server, so it's a lot faster the second time. Kind of like a resume. A prune will cleanup the stray checkpoints.

the way the default command in borgmatic works breaks that: when you run borgmatic again, the first thing it does is prune and compact that now precious checkpoint to hell. So now when i run borgmatic again, I am starting from scratch.

i'd love to hear the reasoning behind why the default actions are set in the order they are. I can venture a guess: you want to prune and compact before you make a new snapshot to save space. Is that the reasoning?

Is there a way we can customize that order, other than of course calling each command one by one...

I am often running into this situation with borg that it notices a huge junk file i left around. it could be a temporary copy of a file, an ISO image i don't want, anything. Typically, it gets stuck on there for a while and, if i notice, i remove the file, kill the backup and start again. With normal borg create, this works fine: borg will restart scanning the filesystem from scratch, but at least the chunks are already on the server, so it's a lot faster the second time. Kind of like a resume. A prune will cleanup the stray checkpoints. the way the default command in borgmatic works breaks that: when you run borgmatic again, the first thing it does is prune and compact that now precious checkpoint to hell. So now when i run borgmatic again, I am starting from scratch. i'd love to hear the reasoning behind why the [default actions](https://torsion.org/borgmatic/docs/how-to/set-up-backups/#default-actions) are set in the order they are. I can venture a guess: you want to prune and compact before you make a new snapshot to save space. Is that the reasoning? Is there a way we can customize that order, other than of course calling each command one by one...
Owner

Thanks for filing this!

I can venture a guess: you want to prune and compact before you make a new snapshot to save space. Is that the reasoning?

Yup, that is indeed the reasoning, although I totally see how that interferes with your use case. There's some discussion about the prune-first rationale in #304. I'm not wedded to that order, however, if there are good arguments for changing it.

Is there a way we can customize that order, other than of course calling each command one by one...

Nope, not currently. I agree it makes sense to have a configuration option to customize the order, since it's clear that a single order can't meet all use cases!

Thanks for filing this! > I can venture a guess: you want to prune and compact before you make a new snapshot to save space. Is that the reasoning? Yup, that is indeed the reasoning, although I totally see how that interferes with your use case. There's some discussion about the prune-first rationale in #304. I'm not wedded to that order, however, if there are good arguments for changing it. > Is there a way we can customize that order, other than of course calling each command one by one... Nope, not currently. I agree it makes sense to have a configuration option to customize the order, since it's clear that a single order can't meet all use cases!
Author

Oh dear, looks like I didn't look properly before opening this issue, let's close this and move to #304, sorry for the noise! :)

Oh dear, looks like I didn't look properly before opening this issue, let's close this and move to #304, sorry for the noise! :)
Owner

No worries! It's good to hear about use cases I hadn't considered.

No worries! It's good to hear about use cases I hadn't considered.
Sign in to join this conversation.
No Milestone
No Assignees
2 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#636
No description provided.