I am recovering from a failed root SSD on my Raspberry Pi. When reattaching my Kopia repository, I’m hitting this “too many open files” error, which, when I google it, hasn’t previously appeared in connection with Kopia.
Kopia-UI on Windows is stuck on “Initializing repository,” with an endless string of messages like
12:25:00.757 finished sweeping {"cache":"metadata","duration":"66.8833ms","totalRetainedSize":466424725,"tooRecentBytes":0,"tooRecentCount":0,"maxSizeBytes":5242880000,"inUsePercent":8}
Connecting to the repository Kopia-UI on the Pi (arm64 Ubuntu 22.04 LTS) is simply failing with request failed with status code 400
.
Kopia on the command line of the Pi yields the following:
$ sudo kopia repository connect filesystem --path -- "/tank/--- Backups/Kopia"
Enter password to open repository:
[a few minutes wait]
ERROR failed to open repository: unable to create shared content manager: error loading indexes: unable to open pack index "ncb2f39362e1c07cd4dee689595ae6de6-s139d3956a2c98620111": unable to open file despite retries: open /root/.cache/kopia/186ab428dc760d97/indexes/ncb2f39362e1c07cd4dee689595ae6de6-s139d3956a2c98620111.sndx: too many open files
ERROR error connecting to repository: unable to create shared content manager: error loading indexes: unable to open pack index "ncb2f39362e1c07cd4dee689595ae6de6-s139d3956a2c98620111": unable to open file despite retries: open /root/.cache/kopia/186ab428dc760d97/indexes/ncb2f39362e1c07cd4dee689595ae6de6-s139d3956a2c98620111.sndx: too many open files
$ sudo kopia repository repair filesystem --path -- "/tank/--- Backups/Kopia"
looking for format blob...
format blob already exists, not recovering, pass --recover-format=yes
$ kopia repository repair --recover-format=yes filesystem --path -- "/tank/--- Backups/Kopia"
looking for replica of format blob in pffff383cc649811fef14f946e104b210-sa61f037b9abfd9b8107...
recovered replica block from pffff383cc649811fef14f946e104b210-sa61f037b9abfd9b8107
$ kopia --version
0.11.3 build: 317cc36892707ab9bdc5f6e4dea567d1e638a070 from: kopia/kopia
(The kopia version of the previous pre-crash machine may or may not have been the same, but it was no earlier than 0.10.)