borgbackupserver icon indicating copy to clipboard operation
borgbackupserver copied to clipboard

File catalog not imported, Browsing archive not possible anymore

Open Nodonn89 opened this issue 2 months ago • 7 comments

Description

New archives after execution of backup plan are not shown in restoring view of files structure. Message: No file catalog available for this archive.

With version Server: v2.91.3, Agent: v2.90.0, catalog was correct. Old archives are still possible to view in catalog.

Steps to Reproduce

Execute backup plan Open Resore --> Files "No file catalog available for this archive."

Installation Type

Docker

BBS Version

v2.96.5

Agent Version (if applicable)

v2.96.5

Agent OS (if applicable)

Ubuntu / Debian

Relevant Logs

File catalog not imported for job #140 — no catalog file arrived at /var/bbs/home/1/.catalog-logs/catalog-140.jsonl — the client either streamed nothing or could not reach the catalog channel. The backup itself is fine; browsing and file-level restore won't work for it until the catalog is rebuilt.

Nodonn89 avatar Sep 14 '26 19:09 Nodonn89

Out of curiosity do you see the file list streamed under the progress bar when your backups run ?

zodorm avatar Sep 15 '26 10:09 zodorm

Hm, cannot remember, need to try this again later. I know that in the log of the bbs-agent-docker-container, I saw the record entries with something like "Start catalog ssh" and "End catalog ssh".

Nodonn89 avatar Sep 15 '26 12:09 Nodonn89

So, triggered backup job now. I didn't saw the file list streamed under the progress bar. Following logs:

BBS-Server from docker-container log:

- Manual backup triggered for plan "Immich data and database" (job #148)	Sep 15, 2026 23:11:28
- Backup command: 'borg' 'create' '--json' '--log-json' '--list' '--progress' '--lock-wait=600' '--compression=lz4' '--exclude-caches' '--noatime' '--exclude=*.tmp' '--exclude=*.pid' '--exclude=*.sock' 'ssh://bbs-my-server@my-server///mnt/usbCloudBackups/borg-server/repositories/1/immich::plan3-2026-09-15_21-11-53' '--' '/mnt/myDrive/immich/immich_files/library' '/mnt/myDrive/immich/profile' '/home/bbs/pgdump'	Sep 15, 2026 23:11:53
- Plugins: pg_dump	Sep 15, 2026 23:11:53
- Job #148 (backup) sent to agent queue	Sep 15, 2026 23:11:53
- Agent started backup job #148 for plan "Immich data and database"	Sep 15, 2026 23:11:53
- PostgreSQL dump: 1 database(s) (immich) dumped to /home/bbs/pgdump (878.5 MB)	Sep 15, 2026 23:14:37
- Backup completed: job #148, 141526 files, 3m 34s	Sep 15, 2026 23:15:27
- Archive created: "plan3-2026-09-15_21-11-53" — 457.9 GB original, 889.5 MB deduplicated	Sep 15, 2026 23:15:35
- Repository stats updated for job #148	Sep 15, 2026 23:15:35
- File catalog not imported for job #148 — no catalog file arrived at /var/bbs/home/1/.catalog-logs/catalog-148.jsonl — the client either streamed nothing or could not reach the catalog channel. The backup itself is fine; browsing and file-level restore won't work for it until the catalog is rebuilt.

BBS-Agent from docker-container log:

- 2026-09-15 21:11:53,682 [INFO] Executing backup job #148: /usr/local/bin/borg create --json --log-json --list --progress --lock-wait=600 --compression=lz4 --exclude-caches --noatime --exclude=*.tmp --exclude=*.pid --exclude=*.sock ssh://bbs-my-server@my-server///mnt/usbCloudBackups/borg-server/repositories/1/immich::plan3-2026-09-15_21-11-53 -- /mnt/myDrive/immich/immich_files/library /mnt/myDrive/immich/profile /home/bbs/pgdump
- 2026-09-15 21:11:53,710 [INFO] Running 1 pre-backup plugin(s)
- 2026-09-15 21:11:53,710 [INFO] Running pre-backup plugin: pg_dump
- 2026-09-15 21:11:53,799 [INFO] PostgreSQL plugin: server is PostgreSQL 14; no matching pg_dump installed, using /usr/bin/pg_dump (install postgresql-client-14 if the versions do not match)
- 2026-09-15 21:11:53,799 [INFO] Dumping PostgreSQL database immich to /home/bbs/pgdump/immich.sql.gz
- 2026-09-15 21:14:37,947 [INFO] PostgreSQL dump complete: 1 file(s) in /home/bbs/pgdump
- 2026-09-15 21:14:37,947 [INFO] Plugin pg_dump completed
- 2026-09-15 21:14:37,970 [INFO] Progress target 141510 files (what the last backup stored)
- 2026-09-15 21:14:38,002 [INFO] Catalog SSH pipe opened for job 148
- 2026-09-15 21:15:27,464 [INFO] Job #148 completed: 141526 files, 491694857948 bytes original, 932675134 bytes dedup
- 2026-09-15 21:15:27,471 [INFO] Catalog SSH pipe closed, 141857 entries streamed
- 2026-09-15 21:15:35,163 [INFO] Cleaning up PostgreSQL dumps in /home/bbs/pgdump

Nodonn89 avatar Sep 15 '26 21:09 Nodonn89

Still digging on this one and I need a couple of things from you, because the backup itself is fine and only the catalog stream is missing.

The key question zodorm asked: during a backup, do you see the per-file list scrolling under the progress bar? If not, borg is emitting no file entries and there is nothing to catalog.

Could you grab two things after a backup that shows "no catalog file available":

  1. The agent container log around that job — the lines that say either Catalog SSH pipe closed, N entries streamed or Catalog SSH pipe exited with code ....
  2. On the BBS server, the file /var/bbs/home/1/.catalog-logs/.catalog-diag.log (last few entries).

Those will tell me whether the agent streamed nothing, or streamed to a path the server is not reading. The catalog channel is a separate SSH connection from the agent back to the BBS server, unrelated to your remote borg repo, so it is likely an SSH/path issue on that channel. Thanks.

marcpope avatar Sep 16 '26 02:09 marcpope

Looks like the group 1000(www-data) is missing in the catalog execution, logs below:

catalog-dial.log record from backup run without catalog:

=== catalog-write job=154 2026-09-16T07:24:47+02:00 ===
user=uid=1001(bbs-my-server) gid=1001(bbs-my-server) groups=1001(bbs-my-server)
target=/var/bbs/home/1/.catalog-logs/catalog-154.jsonl
dir_perms=drwxrws--- bbs-my-server:UNKNOWN
mount=ext2/ext3
created: -rw-rw-r-- bbs-my-server:UNKNOWN 22791878 bytes
chgrp=FAILED fallback=644 final=-rw-r--r-- bbs-my-server:UNKNOWN

older catalog-dial.log record from backup run with exisiting catalog:

=== catalog-write job=122 2026-09-14T03:03:08+02:00 ===
user=uid=1001(bbs-my-server) gid=1001(bbs-my-server) groups=1001(bbs-my-server),1000(www-data)
target=/var/bbs/home/1/.catalog-logs/catalog-122.jsonl
dir_perms=drwxrws--- bbs-my-server:www-data
mount=ext2/ext3
created: -rw-rw-r-- bbs-my-server:www-data 22785878 bytes
chgrp=ok final=-rw-r----- bbs-my-server:www-data

I didn't saw the per-file list under the progress bar during the backup run. Just the file counter in the progress bar of current/total files. The agent container log is the same as posted before (BBS-Agent from docker-container log).

Nodonn89 avatar Sep 16 '26 05:09 Nodonn89

Your catalog-diag.log help fix it. Comparing your working run to the broken one:

  • Working (job 122): groups=...,1000(www-data) and dir bbs-my-server:www-data, chgrp=ok.
  • Broken (job 154): groups=1001(bbs-my-server) only, dir bbs-my-server:UNKNOWN, chgrp=FAILED.

So www-data's group id shifted across an update. That left the .catalog-logs directory group-owned by an orphan gid and dropped the SSH user from the www-data group. The directory is mode 2770, so once the web user is no longer in its group it can't even enter the directory to see the file — which is why the server said "no catalog file arrived" while the backup and the file were both fine.

Fixed in v2.96.7:

  • On container start, each SSH user is re-added to the www-data group and .catalog-logs is re-owned to user:www-data (2770).
  • The streaming channel now also makes the directory reachable by the web user on the next backup when it can't set the group, so it self-heals without a restart.

I reproduced your exact drwxrws--- ...:UNKNOWN state in a container and confirmed the web user can read the catalog again after both paths. Pull the v2.96.7 image; new backups will catalog normally, and you can rebuild the catalog for the archives that missed it from the repository's Rebuild Catalog action. Reopen if it persists.

marcpope avatar Sep 16 '26 14:09 marcpope

Fix works. Also rebuilding catalog of old archives worked fine. thx

Nodonn89 avatar Sep 16 '26 16:09 Nodonn89