NotADirectoryError after 2.0.0b5 -> 2.0.0b19 migration
I just migrated to Debian Trixie, which upgraded borgbackup from 2.0.0b5-1 to 2.0.0b19-1.
My daily backup command
nice -15 borg2 -r /path/to/repo create --compression zstd,22 {now:%Y%m%d} /src/dir
now fails with the following error:
NotADirectoryError: [Errno 20] Not a directory: '/path/to/repo/config/readme'
Indeed, config is a file with the following content:
[repository]
version = 2
segments_per_dir = 1000
max_segment_size = 524288000
append_only = 0
storage_quota = 0
additional_free_space = 0
id = 87ef3425223d9827bd36113b5c10231d89c0a51f1a6672c39227214d524286e9
Was there a change in the way the config is stored?
Is there a migration path?
I read the detailed changelog and found no hint.
The only reference to this error I could find is #8652 but it doesn't seem relevant to my case (or I didn't understand how).
I realize that 2.0.0 is not meant to be used in production. I could trash my backup, create a new one from scratch and move on. But I'd be happy to understand and I figured someone else could benefit from the answer.
Reported downstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1114650.
https://github.com/borgbackup/borg/issues/9000#issuecomment-3220100015
There is no support for beta-to-beta upgrades / repo format conversion. As long as the repo format does not change, it might work, but if it changes, you have to create a new repo. That's why it should not be used for production.
You can try to use the repo with the borg2 beta that you used to create it.
Thanks for answering. This is what I suspected but I'm glad I got it confirmed.
I'd have used 1.4 but since 2.0b was packaged in Debian stable, I figured it was considered so close to stable it wouldn't change/break and I used it to avoid a migration later on.
No big deal. I'll rebuild a repo from scratch with the new version and it shall work until the next Debian stable.
Thanks for the hard work.
Alternatively, if you want to stay with the version 2 repository format, go back to the Releases section on the GitHub page here, and get your matching 2.0.0b5 binary from the Assets. Thanks @ThomasWaldmann for building these.