Selective restore using Borg?

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.10
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 13
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO

Background: At restore, I have found that my Borg backup repo is corrupted. I have tried to integrity-check it and use the repair function. It then gives me a green light, but at restore it fails again. I’m now in progress of a second round of integrity check + repair, but my hopes are low.

Question: I want to try to do a restore excluding the data files. Is there a way to trigger this kind of partial restore? (Data files are synced to devices, so can be re-synced easily.)

I have read this: Pro-tip: Backup archives access - it seems I could sync everything but the files out of the Borg archive. But how do I then restore these files unto a working Nextcloud AIO instance?

I have read this: How to exclude Nextcloud’s data directory or the preview folder from backup? - external storage seems like a good option for when I manage to restore, as I can backup the data separately and restore quite easily. But the Nextcloud DB, calendar, tasks, Deck, etc - there is no simple way to restore this without restoring the Borg archive.

Thank you!

In case this gives anything, the latest verification logs:

Borg verification logs
2025-10-28T13:59:06.175822258Z Checking the backup integrity...
2025-10-28T13:59:07.030290136Z Starting repository check
2025-10-28T20:13:47.949346066Z finished segment check at segment 14125
2025-10-28T20:13:47.971576078Z Starting repository index check
2025-10-28T20:13:47.971742034Z Index object count match.
2025-10-28T20:13:49.379488578Z Finished full repository check, no problems found.
2025-10-28T20:13:49.388229734Z Starting archive consistency check...
2025-10-28T20:13:50.333575439Z Starting cryptographic data integrity verification...
2025-10-29T00:49:54.967846921Z Local Exception
2025-10-29T00:49:54.974332350Z Traceback (most recent call last):
2025-10-29T00:49:54.974352183Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 5465, in main
2025-10-29T00:49:54.974359183Z     exit_code = archiver.run(args)
2025-10-29T00:49:54.974364433Z                 ^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974369391Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 5383, in run
2025-10-29T00:49:54.974374933Z     rc = func(args)
2025-10-29T00:49:54.974379891Z          ^^^^^^^^^^
2025-10-29T00:49:54.974384849Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 200, in wrapper
2025-10-29T00:49:54.974390391Z     return method(self, args, repository=repository, **kwargs)
2025-10-29T00:49:54.974395349Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974400599Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 379, in do_check
2025-10-29T00:49:54.974405849Z     if not args.repo_only and not ArchiveChecker().check(
2025-10-29T00:49:54.974410807Z                                   ^^^^^^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974416057Z   File "/usr/lib/python3.12/site-packages/borg/archive.py", line 1659, in check
2025-10-29T00:49:54.974421307Z     self.verify_data()
2025-10-29T00:49:54.974426265Z   File "/usr/lib/python3.12/site-packages/borg/archive.py", line 1738, in verify_data
2025-10-29T00:49:54.974431515Z     encrypted_data = next(chunk_data_iter)
2025-10-29T00:49:54.974436474Z                      ^^^^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974441432Z   File "/usr/lib/python3.12/site-packages/borg/repository.py", line 1246, in get_many
2025-10-29T00:49:54.974446682Z     yield self.get(id_)
2025-10-29T00:49:54.974451348Z           ^^^^^^^^^^^^^
2025-10-29T00:49:54.974456307Z   File "/usr/lib/python3.12/site-packages/borg/repository.py", line 1240, in get
2025-10-29T00:49:54.974461557Z     return self.io.read(segment, offset, id)
2025-10-29T00:49:54.974466515Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974471473Z   File "/usr/lib/python3.12/site-packages/borg/repository.py", line 1643, in read
2025-10-29T00:49:54.974477015Z     size, tag, key, data = self._read(fd, self.put_header_fmt, header, segment, offset, (TAG_PUT, ), read_data)
2025-10-29T00:49:54.974506181Z                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974511723Z   File "/usr/lib/python3.12/site-packages/borg/repository.py", line 1677, in _read
2025-10-29T00:49:54.974516098Z     data = fd.read(length)
2025-10-29T00:49:54.974519889Z            ^^^^^^^^^^^^^^^
2025-10-29T00:49:54.974523973Z OSError: [Errno 5] I/O error
2025-10-29T00:49:54.974527473Z 
2025-10-29T00:49:54.974531556Z Platform: Linux nextcloud-aio-borgbackup 6.12.55-current-rockchip64 #1 SMP PREEMPT Thu Oct 23 14:20:48 UTC 2025 aarch64
2025-10-29T00:49:54.974536223Z Linux: Unknown Linux  
2025-10-29T00:49:54.974540014Z Borg: 1.4.1  Python: CPython 3.12.11 msgpack: 1.0.8 fuse: llfuse 1.5.1 [pyfuse3,llfuse]
2025-10-29T00:49:54.974544389Z PID: 28  CWD: /
2025-10-29T00:49:54.974552847Z sys.argv: ['/usr/bin/borg', 'check', '-v', '--verify-data']
2025-10-29T00:49:54.974557222Z SSH_ORIGINAL_COMMAND: None
2025-10-29T00:49:54.974561014Z 
2025-10-29T00:49:55.121187248Z Some errors were found while checking the backup integrity!
2025-10-29T00:49:55.121246747Z Check the AIO interface for advice on how to proceed now!

The last two repairs I’ve run, it says all good. But then it fails during restore.

Logs from Borg integrity check + repair
2025-10-29T07:22:12.939589103Z Checking the backup integrity and repairing it...
2025-10-29T07:22:13.772436907Z This is a potentially dangerous function.
2025-10-29T07:22:13.772473073Z check --repair might lead to data loss (for kinds of corruption it is not
2025-10-29T07:22:13.772476282Z capable of dealing with). BE VERY CAREFUL!
2025-10-29T07:22:13.772478907Z 
2025-10-29T07:22:13.772598197Z Type 'YES' if you understand this and want to continue: Starting repository check
2025-10-29T13:39:06.068999821Z finished segment check at segment 14125
2025-10-29T13:39:06.093205567Z Starting repository index check
2025-10-29T13:39:08.109167441Z Finished full repository check, no problems found.
2025-10-29T13:39:08.123795828Z Starting archive consistency check...
2025-10-29T13:39:09.032923013Z Analyzing archive 20250430_230115-nextcloud-aio (1/18)
2025-10-29T13:40:17.656826225Z Analyzing archive 20250531_230118-nextcloud-aio (2/18)
2025-10-29T13:41:26.794883052Z Analyzing archive 20250630_230130-nextcloud-aio (3/18)
2025-10-29T13:42:37.832357045Z Analyzing archive 20250731_230136-nextcloud-aio (4/18)
2025-10-29T13:43:47.799592855Z Analyzing archive 20250830_230149-nextcloud-aio (5/18)
2025-10-29T13:44:55.108090958Z Analyzing archive 20250921_230140-nextcloud-aio (6/18)
2025-10-29T13:46:00.073577567Z Analyzing archive 20250928_230135-nextcloud-aio (7/18)
2025-10-29T13:47:04.774058466Z Analyzing archive 20250930_230159-nextcloud-aio (8/18)
2025-10-29T13:48:12.611461513Z Analyzing archive 20251005_230129-nextcloud-aio (9/18)
2025-10-29T13:49:17.896307660Z Analyzing archive 20251012_230152-nextcloud-aio (10/18)
2025-10-29T13:50:20.747589840Z Analyzing archive 20251015_153203-nextcloud-aio (11/18)
2025-10-29T13:51:23.835112024Z Analyzing archive 20251015_230902-nextcloud-aio (12/18)
2025-10-29T13:52:26.651370750Z Analyzing archive 20251016_230125-nextcloud-aio (13/18)
2025-10-29T13:53:29.533339627Z Analyzing archive 20251018_114346-nextcloud-aio (14/18)
2025-10-29T13:54:32.452175857Z Analyzing archive 20251018_230123-nextcloud-aio (15/18)
2025-10-29T13:55:35.494838138Z Analyzing archive 20251019_230138-nextcloud-aio (16/18)
2025-10-29T13:56:38.606665645Z Analyzing archive 20251020_230129-nextcloud-aio (17/18)
2025-10-29T13:57:41.647054648Z Analyzing archive 20251021_230144-nextcloud-aio (18/18)
2025-10-29T13:58:45.931135157Z Writing Manifest.
2025-10-29T13:58:46.092804445Z Committing repo.
2025-10-29T13:58:48.041760667Z Archive consistency check complete, no problems found.
2025-10-29T13:58:48.158220759Z Check finished successfully on 29.10.2025 - 13:58:48 (06 hours 36 minutes 36 seconds).

OK, after verifying and trying to repair 2-3 times, the AIO interface now tells me that the backup repo is not corrupted.

Still at restore, I seem to be getting one error consistently.

It starts to transfer files, and then suddenly say “Connection aborted (103)”. After this, errors are thrown for “Socket not connected (107)”.

Logs for connection aborted / socket not connected
...
2025-10-29T20:48:04.511640350Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/05-Frantz_Casseus-Etude.mp3
2025-10-29T20:48:04.760756263Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/06-Frantz_Casseus-Romance.mp3
2025-10-29T20:48:05.108800166Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/07-Frantz_Casseus-Lullaby.mp3
2025-10-29T20:48:05.540416158Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/
2025-10-29T20:48:05.540458742Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/Haitian_Folk_Songs/
**2025-10-29T20:48:05.540416450Z rsync: [sender] read errors mapping "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/07-Frantz_Casseus-Lullaby.mp3": Connection aborted (103)**
2025-10-29T20:48:05.540467200Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/08-Frantz_Casseus-Dance.mp3": **Socket not connected (107)**
2025-10-29T20:48:05.540471867Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/Haitian_Folk_Songs/01_Haiti.mp3": **Socket not connected (107)**
2025-10-29T20:48:05.540475367Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/Haitian_Folk_Songs/02_Choucounne.mp3": **Socket not connected (107)**
2025-10-29T20:48:05.540495783Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/Haitian_Folk_Songs/03_Harvest_Song.mp3": Socket not connected (107)
2025-10-29T20:48:05.540508908Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus_and_Lolita_Cuevas/Haitian_Folk_Songs/04_Nan_Guinin.mp3": Socket not connected (107)
...

Then it keeps chugging along, and actually transfers some more files without error? (highlighted examples below). Finally it dies. But it seems each time, it transfers a few gigabytes more…? So I suppose I will keep trying to restore until I get tired of it..

Logs for some files succeeding, some failing, and finally restore failure
...
2025-10-29T20:48:05.580839543Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/Takanashi_Yasuharu-Mononoke_Original_Soundtrack-OST-2007-COCMP3/12-takanashi_yasuharu-kanashige-cocmp3.mp3": Socket not connected (107)
2025-10-29T20:48:05.580877168Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/Takanashi_Yasuharu-Mononoke_Original_Soundtrack-OST-2007-COCMP3/13-takanashi_yasuharu-abunage-cocmp3.mp3": Socket not connected (107)
2025-10-29T20:48:05.580907793Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/Takanashi_Yasuharu-Mononoke_Original_Soundtrack-OST-2007-COCMP3/14-takanashi_yasuharu-utsurigi-cocmp3.mp3": Socket not connected (107)
2025-10-29T20:48:05.580939585Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/Takanashi_Yasuharu-Mononoke_Original_Soundtrack-OST-2007-COCMP3/back.jpg": Socket not connected (107)
2025-10-29T20:48:05.580971668Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/Takanashi_Yasuharu-Mononoke_Original_Soundtrack-OST-2007-COCMP3/front.jpg": Socket not connected (107)
2025-10-29T20:48:05.606465277Z WARNING: nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/07-Frantz_Casseus-Lullaby.mp3 failed verification -- update discarded (will try again).
2025-10-29T20:48:05.946245417Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Ghibli_Studios/The_Boy_and_the_Heron_Original_Soundtrack/
2025-10-29T20:48:05.946275167Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gia_Margaret/
2025-10-29T20:48:05.946244542Z rsync: [sender] send_files failed to open "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/F/Frantz_Casseus/Haitian_Dances_1954/07-Frantz_Casseus-Lullaby.mp3": Socket not connected (107)
2025-10-29T20:48:05.946278667Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gigi_D_Agostino-The_Essential_Gigi_D_Agostino-ZYX20903-2-2CD-2009-BWA/
**2025-10-29T20:48:05.946311625Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gino-Marinello-Orchestra/**
**2025-10-29T20:48:05.946324167Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gipsy_Kings-Greatest_Hits/**
**2025-10-29T20:48:05.946332917Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gipsy_Kings-Luna_De_Fuego/**
2025-10-29T20:48:05.946341084Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gisburg-No_Stranger_Not_At_All/
2025-10-29T20:48:05.946349250Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Glass_Animals-Dreamland-2020/
2025-10-29T20:48:05.946357417Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Glass_Animals-How_to_be_a_Human_Being-2016/
2025-10-29T20:48:05.946389208Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Glass_Animals/
2025-10-29T20:48:05.946398542Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Godspeed_You_Black_Emperor/
2025-10-29T20:48:05.946406708Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gorillaz/
2025-10-29T20:48:05.946414583Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Grateful_Dead-The_Very_Best_Of_Grateful_Dead/
2025-10-29T20:48:05.946422458Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Great_Lake_Swimmers/
2025-10-29T20:48:05.946430625Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Green.Day/
2025-10-29T20:48:05.946438208Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gregory_Porter-Be_Good_2012/
2025-10-29T20:48:05.946446375Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gregory_Porter-Liquid_Spirit_2013/
2025-10-29T20:48:05.946454250Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Grizzly_Bear/
2025-10-29T20:48:05.946461833Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Groovehouse-Ebredj_Mellettem-2005/
2025-10-29T20:48:05.946469708Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gudrun_Gut_+_Mabe_Fratti/
2025-10-29T20:48:05.946482541Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Guns.N.Roses/
2025-10-29T20:48:05.946490708Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Guru-Jazzmatazz,_Volume_1/
2025-10-29T20:48:05.946498875Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gustaf_Ljunggren/
2025-10-29T20:48:05.946506458Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gustavo_Santaolalla/
2025-10-29T20:48:05.946514333Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gwen_Stefani-Love_Angel_Music_Baby-2004-LiS/
2025-10-29T20:48:05.946522208Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/Gwen_Stefani-The_Sweet_Escape-2006-uF/
2025-10-29T20:48:05.946534458Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/The_Galaxy_Sound_Orchestra-Synthesizer_Hits,_Vol._1/
2025-10-29T20:48:05.946542624Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/The_Galaxy_Sound_Orchestra-Synthesizer_Hits,_Vol._2/
2025-10-29T20:48:05.946550499Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/The_Galaxy_Sound_Orchestra-Synthesizer_Hits,_Vol._3/
2025-10-29T20:48:05.946558666Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/The_Galaxy_Sound_Orchestra-Synthesizer_Hits,_Vol._4/
2025-10-29T20:48:05.946566541Z nextcloud_aio_nextcloud_data/andreas/files/Music/Music-sh/G/The_Good_The_Bad_And_The_Queen-2007/
2025-10-29T20:48:06.037173606Z total: matches=0  hash_hits=0  false_alarms=0 data=38108447992
2025-10-29T20:48:06.178155098Z 
2025-10-29T20:48:06.179002095Z rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.4.1]
2025-10-29T20:48:06.179028053Z Number of files: 117,388 (reg: 103,328, dir: 13,889, link: 171)
2025-10-29T20:48:06.179056636Z Number of created files: 7,490 (reg: 7,105, dir: 385)
2025-10-29T20:48:06.179091636Z Number of deleted files: 0
2025-10-29T20:48:06.179101261Z Number of regular files transferred: 7,109
2025-10-29T20:48:06.179109428Z Total file size: 190.88G bytes
2025-10-29T20:48:06.179117303Z Total transferred file size: 43.81G bytes
2025-10-29T20:48:06.179126053Z Literal data: 38.11G bytes
2025-10-29T20:48:06.179133344Z Matched data: 0 bytes
2025-10-29T20:48:06.179140928Z File list size: 196.55K
2025-10-29T20:48:06.179148219Z File list generation time: 0.026 seconds
2025-10-29T20:48:06.179155511Z File list transfer time: 0.000 seconds
2025-10-29T20:48:06.179163094Z Total bytes sent: 38.12G
2025-10-29T20:48:06.179170386Z Total bytes received: 12.10M
2025-10-29T20:48:06.179177678Z 
2025-10-29T20:48:06.179184969Z sent 38.12G bytes  received 12.10M bytes  16.66M bytes/sec
2025-10-29T20:48:06.179192261Z total size is 190.88G  speedup is 5.01
2025-10-29T20:48:06.187545562Z Something failed while restoring from backup.
2025-10-29T20:48:06.194847700Z rsync: [sender] change_dir "/tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data" failed: Socket not connected (107)
2025-10-29T20:48:06.194865200Z sending incremental file list
2025-10-29T20:48:06.195362198Z delta-transmission disabled for local transfer or --whole-file
2025-10-29T20:48:06.195859196Z total: matches=0  hash_hits=0  false_alarms=0 data=0
2025-10-29T20:48:06.316782558Z 
2025-10-29T20:48:06.316814058Z sent 19 bytes  received 79 bytes  196.00 bytes/sec
2025-10-29T20:48:06.316818141Z total size is 0  speedup is 0.00
2025-10-29T20:48:06.316782850Z rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.4.1]
2025-10-29T20:48:06.317346931Z Something failed while restoring the configuration.json.

Searching for the errors gives nothing, but I found the below on Borg’s docs site: All about JSON: How to develop frontends — Borg - Deduplicating Archiver 1.4.1 documentation

BackupRaceConditionError rc: 103

{}: file type or inode changed while we backed it up (race condition, skipped file)

And

BackupFileNotFoundError rc: 107

{}: {}

Which I’m not sure what it means. Borg now finds the backup repo OK, but the above consistently happens when I try to restore. Each time restore runs, it seems to transfer a couple of GB before the error happens.

Borg repo and nextcloud docker container for the data is on the same drive. I doubt that the new SSD I got and trying to both restore from, and write to, is already broken.