Borg tells me repo already exists, but can't list it
Hello,
I've installed borg on Arch Linux with the current borg package (borg version 1.0.1), and when I try to create a new repo borg tells me that it already exists, although I never used it before and /mnt/backup is a fresh ext4 filesystem.
Here's what happened:
[root@viki ~]# ls -la /mnt/backup
insgesamt 24
drwxr-xr-x 3 root root 4096 13. Apr 18:55 .
drwxr-xr-x 8 root root 4096 13. Apr 18:21 ..
drwx------ 2 root root 16384 3. Apr 17:29 lost+found
[root@viki ~]# borg init --debug /mnt/backup
using builtin fallback logging configuration
Repository /mnt/backup already exists.
[root@viki ~]# borg list /mnt/backup
Exception ignored in: <bound method Repository.__del__ of <Repository /mnt/backup>>
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/borg/repository.py", line 71, in __del__
assert False, "cleanup happened in Repository.__del__"
AssertionError: cleanup happened in Repository.__del__
/mnt/backup is not a valid repository. Check repo config.
What can I do now?
Regards, quaec
If you have mounted your backup device on /mnt/backup, just do not use that directory directly, but let borg create a directory in there, e.g.:
borg init /mnt/backup/myrepo
borg create /mnt/backup/myrepo::firstbackup ~
Note: guess I have to review some of the examples in the docs, iirc they also use /mnt/backup (that works, but you'ld need to mount your backup device on /mnt and let borg create a "backup" directory in there).
Thank you for the fast answer! It works now.
Yeah, I read the docs and I understood it as if "/mnt/backup" would be the mount point and not /mnt/.
reopened for docs review / clarification.
@quaec I use to mount my backup disk on /mnt/backup, too. :)
I think it would be more clear if the documentation used /mnt/backup/repo for the repository path.
@ape I wanted something short for the docs, so linewraps are avoided as long as possible.
/path/to/repo is a bit shorter and still very clear.
was fixed in 1.0-maint, soon to be merged into master also.