Traceback with delete subcommand when no archive is given
Have you checked borgbackup docs, FAQ, and open GitHub issues?
Yes.
Is this a BUG / ISSUE report or a QUESTION?
BUG
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
2.0.0b8
Operating system (distribution) and version.
Manjaro Linux stable 24.0.2
Hardware / network configuration, and filesystems used.
Lenovo Thinkpad X1, no network usage, ext4
How much data is handled by borg?
~1.2 GB
Full borg commandline that lead to the problem (leave away excludes and passwords)
Run a delete command on a repository containing an archive:
# /root/borg2b8 delete --debug --show-rc --repo 2.0.borg
(I realize it's probably a problem that no archive is specified on the command-line.)
Describe the problem you're observing.
The delete command results in a traceback.
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Reproduction steps involve creating a new repo and then creating an archive in it. Contents don't seem to matter.
# /root/borg2b8 rcreate -e keyfile-blake2-aes-ocb --repo 2.0.borg
...
# /root/borg2b8 create --repo 2.0.borg myarchive /root/tmp
Then run the delete command above.
Include any warning/errors/backtraces from the system logs
using builtin fallback logging configuration
33 self tests completed in 0.07 seconds
Verified integrity of /root/tmp/2.0.borg/index.7
Local Exception
Error:
AttributeError: 'Archiver' object has no attribute 'print_error'
If reporting bugs, please include the following:
Traceback (most recent call last):
File "borg/archiver/__init__.py", line 656, in main
File "borg/archiver/__init__.py", line 549, in run
File "borg/archiver/_common.py", line 158, in wrapper
File "borg/archiver/delete_cmd.py", line 27, in do_delete
AttributeError: 'Archiver' object has no attribute 'print_error'
Platform: Linux flux 6.1.85-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:05:44 UTC 2024 x86_64
Linux: Unknown Linux
Borg: 2.0.0b8 Python: CPython 3.11.7 msgpack: 1.0.7 fuse: llfuse 1.5.0 [pyfuse3,llfuse]
PID: 920028 CWD: /root/tmp
sys.argv: ['/root/borg2b8', 'delete', '--debug', '--show-rc', '--repo', '2.0.borg']
SSH_ORIGINAL_COMMAND: None
terminating with error status, rc 2
Yeah, that shouldn't result in a traceback.
But of course one needs to give an archive name for delete as in contrary to borg 1.x that command is only intended for deleting archives (the command to delete a whole repo is rdelete in borg2).
Yup, understood.