borg icon indicating copy to clipboard operation
borg copied to clipboard

Borg tells me repo already exists, but can't list it

Open quaec opened this issue 10 years ago • 8 comments

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

quaec avatar Apr 13 '16 17:04 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 ~

ThomasWaldmann avatar Apr 13 '16 17:04 ThomasWaldmann

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).

ThomasWaldmann avatar Apr 13 '16 17:04 ThomasWaldmann

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/.

quaec avatar Apr 13 '16 17:04 quaec

reopened for docs review / clarification.

@quaec I use to mount my backup disk on /mnt/backup, too. :)

ThomasWaldmann avatar Apr 13 '16 17:04 ThomasWaldmann

I think it would be more clear if the documentation used /mnt/backup/repo for the repository path.

Ape avatar Apr 13 '16 18:04 Ape

@ape I wanted something short for the docs, so linewraps are avoided as long as possible.

ThomasWaldmann avatar Apr 13 '16 21:04 ThomasWaldmann

/path/to/repo is a bit shorter and still very clear.

Ape avatar Apr 14 '16 04:04 Ape

was fixed in 1.0-maint, soon to be merged into master also.

ThomasWaldmann avatar Apr 15 '16 09:04 ThomasWaldmann