-
-
Notifications
You must be signed in to change notification settings - Fork 742
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
try parallel ops using --bypass-lock #5261
Comments
Could the |
No, it's a hack and not a enhanced locking system. That might come later, but don't hold your breath. |
Hi Thomas, Could you please confirm if this would work safely? I am using the latest v.1.2.0 Thank you in advance. Cheers, |
You shouldn't use that, see the docs. |
Hi Thomas, Thank you very much for your quick reply... I am glad to have your confirmation that this operation being un-safe, even though I have tested it and seemingly nothing was broken. I did some more looking while I was waiting:
The results: Files test-orig/base/.cache/borg/a78...664/chunks and test/base/.cache/borg/a78...664/chunks differ Apart from the new segment files and updated hints+index+integrity+nonce in repo/data after the 2nd run, it seems that there were only a handful of metadata files in BORG_BASE_DIR got updated. The old data segments were all "atomic" to the 1st backup and nothing got changed. I believe this is due to v1.2.0 now run as append-mode by default, correct? Let's say if I want to mount the 1st backup as read-only (with --bypass-lock) while allowing the Repo continued to be worked on for subsequent backup runs (for "create" or other read-only operations only). Would it be safe if I just make a copy of the entire BORG_BASE_DIR, along with the hints+index+integrity+nonce files from 1st run, stack them with overylayfs onto the same repo/data tree (reusing the same repo data store), essentially creating a snapshot of the repo (while allowing additional repo/data files to be added), then run "borg mount --bypass-lock) with a separate env vars of BORG_BASE_DIR pointing to the old BORG_BASE_DIR copy? Sorry if it sounds convoluted... because it is :~) Thank you again. Cheers, |
borg usually does not let you do multiple operations in parallel. it blocks that using an exclusive lock on the repository.
there is a (potentially dangerous) hack with
--bypass-lock
.for some situations, it might actually work ok without leading to problems.
practically try:
borg create repo::archive lotsofdata
plusborg mount repo
borg mount repo
plusborg create repo::archive lotsofdata
Do not try multiple repo-writing ops in parallel!
Do not use a production repo for experiments, just create a temporary one!
The text was updated successfully, but these errors were encountered: