Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to trigger compaction with borg 1.1.x #5665

Open
ThomasWaldmann opened this issue Jan 30, 2021 · 5 comments
Open

how to trigger compaction with borg 1.1.x #5665

ThomasWaldmann opened this issue Jan 30, 2021 · 5 comments

Comments

@ThomasWaldmann
Copy link
Member

one can do the following locally on the repo server:

borg with-lock REPO true

that will lead to compact_segments() being invoked IF one uses borg 1.1.x (due to an implementation detail).

instead of "true" one could also invoke any other command.

using with-lock has these advantages:

  • it does not need the encryption key, so it can be used on the repo server
  • it does not use the cache, thus it does no time-consuming cache-resync when invoked from a different machine than the machine usually doing its backups into that repo.
@hexagonrecursion
Copy link
Contributor

https://borgbackup.readthedocs.io/en/1.2.0b3/usage/notes.html#separate-compaction claims that borg<1.2.0 auto-compacts the segment files at end of each repository-writing command. Under what conditions would manually triggering compaction in borg 1.1.x be desirable?

P.S. Relevant 1.2.0 documentation for the benefit of readers other then me and ThomasWaldmann: https://borgbackup.readthedocs.io/en/1.2.0b3/usage/compact.html

@ThomasWaldmann
Copy link
Member Author

Hmm, iirc there was some user asking this, but i don't remember WHY.

@fantasya-pbem
Copy link
Contributor

fantasya-pbem commented Jun 5, 2022

I am wondering what to do with this. Create a new FAQ how to trigger compaction for the 1.1.x docs? Or we could backport the "separate compaction" article to 1.1.x, stating that this is a feature of 1.2 and compaction can be triggered in 1.1.x by doing this trick.

@ThomasWaldmann
Copy link
Member Author

I don't think we need to extend the docs. The usual way is to just write to the repo with borg 1.1.x and it will implicitly compact at the end of this (as it ever did, nothing new here, even if the borg server is running borg 1.2.x already).

@ThomasWaldmann
Copy link
Member Author

(the docs label here is rather meant as "this issue documents something")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants