PostgreSQL plugin with error message "start_dir needs to be a real directory, symlinks are not supported"

7 views
Skip to first unread message

Stefan Harbich

unread,
Nov 5, 2025, 4:09:16 AM (2 days ago) Nov 5
to bareos-users
Hello, i'm getting the following error message with the PostgreSQL plugin:

...
05-Nov 09:46 bareos-dir JobId 45: Version: 24.0.7~pre11.e690d3a37 (28 October 2025) Debian GNU/Linux 13 (trixie)
05-Nov 09:46 bareos-dir JobId 45: Start Backup JobId 45, Job=backup-postgresql.2025-11-05_09.46.15_03
05-Nov 09:46 bareos-dir JobId 45: Connected Storage daemon at bareos.intern.example.com:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-dir JobId 45:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-dir JobId 45: Probing client protocol... (result will be saved until config reload)
05-Nov 09:46 bareos-dir JobId 45: Connected Client: bareos-fd at bareos.intern.example.com:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-dir JobId 45:    Handshake: Immediate TLS
05-Nov 09:46 bareos-dir JobId 45:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-sd JobId 45: Using just in time reservation for job 45
05-Nov 09:46 bareos-dir JobId 45: Using Device "JustInTime Device" to write.
05-Nov 09:46 bareos-fd JobId 45: Connected Storage daemon at bareos.intern.example.com:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-fd JobId 45:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
05-Nov 09:46 bareos-sd JobId 45: Version: 24.0.7~pre11.e690d3a37 (28 October 2025) Debian GNU/Linux 13 (trixie)
05-Nov 09:46 bareos-fd JobId 45: Extended attribute support is enabled
05-Nov 09:46 bareos-fd JobId 45: ACL support is enabled
05-Nov 09:46 bareos-fd JobId 45: python3-fd-mod: python: 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] | pg8000: 1.31.2
05-Nov 09:46 bareos-fd JobId 45: python3-fd-mod: Connected to PostgreSQL version 130022
05-Nov 09:46 bareos-fd JobId 45: python3-fd-mod: data_dir: /var/lib/postgresql/13/main/
05-Nov 09:46 bareos-fd JobId 45: Fatal error: python3-fd-mod: building paths to backup failed with value.error: start_dir needs to be a real directory, symlinks are not supported.05-Nov 09:46 bareos-fd JobId 45: Version: 24.0.7~pre11.e690d3a37 (28 October 2025) Debian GNU/Linux 13 (trixie)
05-Nov 09:46 bareos-fd JobId 45: Fatal error: filed/fd_plugins.cc:784 PluginSave: Command plugin "python:module_name=bareos-fd-postgresql:db_host=postgresql.intern.example.com:db_user=postgres:db_password=:wal_archive_dir=/media/backups/dsme01.intern.example.com/postgresql/wal_archives/" requested, but job is already cancelled.
...
The directories:
- "/media/backups/dsme01.intern.example.com/postgresql/wal_archives/"
- "/var/lib/postgresql/13/main/"
exist but are not linked. What does this error message mean? Where should I look for the problem? The PostgreSQL database server and the Bareos server are not running on the same server. The plugin and the pg8000 software are installed on both systems (Director & File Daemon). I don't understand it. When I had the PostgreSQL database server and Bareos server installed on the same hardware, everything worked. Now, after separating them, it doesn't. I'm at a loss.
Regards, Stefan Harbich

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 5, 2025, 5:15:36 AM (2 days ago) Nov 5
to bareos-users
PostgreSQL plugin will use FD bareos function to collect the data, like reading archived wal
So the FD and the plugin need to be hosted on the PostgreSQL cluster.

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 5, 2025, 5:25:23 AM (2 days ago) Nov 5
to bareos-users
The cluster might be read-only replica too ;-9

Stefan Harbich

unread,
Nov 5, 2025, 12:03:52 PM (2 days ago) Nov 5
to Bruno Friedmann (bruno-at-bareos), bareos-users
Hello,
does the error message refer to the `wal_archive` directory?
Specifically, does it indicate a lack of permission for the `bareos` user?
Only the `postgres` user has access to `wal_archive`.
Does the `bareos` user also need read and write permissions?
Regards, Stefan Harbich
--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/WubZ9eo1n34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bareos-users/d9b8f876-ed2c-40ea-867c-4b69b82f2263n%40googlegroups.com.

Bruno Friedmann (bruno-at-bareos)

unread,
Nov 6, 2025, 5:15:10 AM (yesterday) Nov 6
to bareos-users
The plugin complains that "start_dir`/var/lib/postgresql/13/main/ is a symlink and not the real location where the cluster data are written.
so simply give the real location.

As the bareos fd runs normally as root it shouldn't be a right permission issues.

Stefan Harbich

unread,
Nov 6, 2025, 6:58:08 PM (11 hours ago) Nov 6
to Bruno Friedmann (bruno-at-bareos), bareos-users
I think it's a permissions issue.
I didn't change any permissions when I installed the Bareos server on different hardware.
I checked the UID and GID.
They're the same on both systems.
I even reinstalled the PostgreSQL server and the Bareos server.
Always the same result. I'm at my wit's end.
Here is my Debug Log.
Greetings from Stefan Harbich

Am Mittwoch, dem 05.11.2025 um 02:25 -0800 schrieb Bruno Friedmann (bruno-at-bareos):
--
2025_11_07_dsme01-fd-debug

Stefan Harbich

unread,
Nov 6, 2025, 7:45:04 PM (10 hours ago) Nov 6
to bareos-users
I was able to solve the problem.
I backed up all the databases from the PostgreSQL server to a dump file.
I deleted and reinstalled the PostgreSQL server.
I restored all the databases.
I reconfigured the WAL archive.
Now it works.

Reply all
Reply to author
Forward
0 new messages