borgmatic fails with borg prune
when backing up to an rclone mounted drive #344
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#344
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I'm trying to backup to a network drive mounted with rclone.
Steps to reproduce (if a bug)
Relevant config file:
location:
# List of source directories to backup (required). Globs and
source_directories:
- /home/test.borg
retention:
# Keep all archives within this time interval.
Number of hourly archives to keep.
keep_hourly: 24
Number of daily archives to keep.
keep_daily: 7
Number of weekly archives to keep.
keep_weekly: 4
Number of monthly archives to keep.
keep_monthly: 6
I run the command:
borgmatic --config ~/.config/borgmatic/config.yaml --verbosity 2
Actual behavior (if a bug)
Ensuring legacy configuration is upgraded
/home/.config/borgmatic/config.yaml: No commands to run for pre-everything hook
/home/.config/borgmatic/config.yaml: No commands to run for pre-prune hook
/home/.config/borgmatic/config.yaml: No commands to run for pre-backup hook
/home/.config/borgmatic/config.yaml: No commands to run for pre-check hook
/mnt/test/test1.borg: Pruning archives
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --debug --show-rc /mnt/test/test1.borg
using builtin fallback logging configuration
35 self tests completed in 0.12 seconds
Local Exception
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/borg/archiver.py", line 4565, in main
/mnt/test/test1.borg: Error running actions for repository
Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --debug --show-rc /mnt/test/test1.borg' returned non-zero exit status 2.
/home/.config/borgmatic/config.yaml: No commands to run for on-error hook
/home/.config/borgmatic/config.yaml: Error running configuration file
/home/.config/borgmatic/config.yaml: No commands to run for post-everything hook
summary:
/home/.config/borgmatic/config.yaml: Error running configuration file
/mnt/test/test1.borg: Error running actions for repository
using builtin fallback logging configuration
35 self tests completed in 0.12 seconds
Local Exception
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/borg/archiver.py", line 4565, in main
Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --debug --show-rc /mnt/test/test1.borg' returned non-zero exit status 2.
Expected behavior (if a bug)
borgmatic to run successfully
Other notes / implementation ideas
I can run
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6
successfully on the repository, but it seems like borgmatic is failing with it.I assume this has something to do with rclone, because borgmatic runs successfuly for a locally mounted drive.
Environment
borgmatic version: [1.5.8]
borgmatic installation method: [Arch AUR]
Borg version: [1.1.13]
Python version: [3.8.3]
Database version (if applicable): [12.3]
operating system and version: [Arch Linux]
Thank you for taking the time to file this and include all the detailed information. Based on the log from running borgmatic, the error is occurring within Borg itself:
So it's super odd that the problem doesn't reproduce when you run Borg by itself. A couple of thoughts:
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --debug --show-rc /mnt/test/test1.borg
... The addition of--debug --show-rc
shouldn't make a difference, but good to check anyway.borgmatic prune --config ~/.config/borgmatic/config.yaml --verbosity 2
. (Note the addition ofprune
.) It's possible that one thing that's differen't between borgmatic and Borg is that borgmatic is also doing acreate
and acheck
. But if you just specifyborgmatic prune
, then it'll be more similiar to running Borg by itself.Hopefully that'll help us figure out what's going on here!
So, today I came back to it, and did as you suggested. I ran
borgmatic prune --config ~/.config/borgmatic/config.yaml --verbosity 2
, alsoborgmatic create
andborgmatic check
. All suceeded without error.I went back to my original borgmatic command:
borgmatic --config ~/.config/borgmatic/config.yaml --verbosity 2
, and now that worked as well.What is different now, I cannot tell you, but everything seems ok on my end now. Fingers crossed its smooth sailing from here.
Thanks for the help though, really appreciate it!
I'm glad to hear it's working now! Please let me know if the problem occurs again.