Bareos Backup: "Encryption between Director and PostgreSQL" Database Not Possible

67 views
Skip to first unread message

Stefan Harbich

unread,
May 19, 2026, 1:18:05 PMMay 19
to bareos-users
Hello,
i have established an encrypted connection between the Bareos Director and the PostgreSQL database using pgbouncer.
However, the backup consistently fails during larger backup jobs—regardless of the settings I use in pgbouncer.
It always returns the exact same error message:
...
bareos-dir JobId 2: Error: Bareos bareos-dir 25.0.4~pre116.b35277fb6 (30Apr26):
OS Information: Debian GNU/Linux 13 (trixie)
JobId: 2
Job: backup-dsme01-fd.2026-05-19_18.18.57_47
Backup Level: Full (upgraded from Incremental)
Client: "dsme01-fd" 25.0.3~pre96.1f53a5305 (26Mar26) Debian GNU/Linux 11 (bullseye),debian
FileSet: "LinuxServer" 2026-05-19 18:18:57
Pool: "Full" (From Job FullPool override)
Catalog: "MyCatalog" (From Client resource)
Storage: "File" (From Job resource)
Scheduled time: 19-Mai-2026 18:18:57
Start time: 19-Mai-2026 18:18:59
End time: 19-Mai-2026 18:43:11
Elapsed time: 24 mins 12 secs
Priority: 10
Allow Mixed Priority: no
FD Files Written: 450,068
SD Files Written: 450,068
FD Bytes Read: 69,823,568,948 (69.82 GB)
FD Bytes Written: 69,823,570,430 (69.82 GB)
SD Bytes Written: 69,894,049,058 (69.89 GB)
Rate: 48087,9 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s): Full-0001
Volume Session Id: 2
Volume Session Time: 1779205938
Last Volume Bytes: 69,914,108,576 (69.91 GB)
Non-fatal FD errors: 1
SD Errors: 0
FD termination status: OK
SD termination status: OK
Bareos binary info: Bareos community build (UNSUPPORTED): Get professional support from https://www.bareos.com
Job triggered by: User
Termination: *** Backup Error ***

bareos-dir JobId 2: Fatal error: cats/sql_create.cc:803 Fill Path table Query failed: INSERT INTO Path (Path)
SELECT a.Path
FROM (
SELECT DISTINCT Path
FROM batch
) AS a
WHERE NOT EXISTS (
SELECT Path
FROM Path
WHERE Path = a.Path
)
: ERR=ERROR: relation "batch" does not exist
ZEILE 5: FROM batch
^


29

2026-05-19 18:42:31

bareos-dir JobId 2: Insert of attributes batch table with 450067 entries start

28

2026-05-19 18:42:31

bareos-sd JobId 2: Elapsed time=00:23:31, Transfer rate=49.53 M Bytes/second

27

2026-05-19 18:42:29

bareos-sd JobId 2: Releasing device "FileStorage" (/media/backups/storage).

26

2026-05-19 18:19:00

bareos-sd JobId 2: Ready to append to end of Volume "Full-0001" size=590300

25

2026-05-19 18:19:00

bareos-sd JobId 2: Moving to end of data on volume "Full-0001"
...
It is a pity that it does not seem possible to establish a stable, secure connection between the Bareos Director and the PostgreSQL database via pgbouncer.
If there are no further solutions available,
I will unfortunately have to abandon the Bareos project.
The Bareos Director and the PostgreSQL database are not located within the same network segment; we would only be able to utilize this solution if a stable, secure connection were possible.

Regards Stefan Harbich

Brock Palen

unread,
May 19, 2026, 1:53:25 PMMay 19
to Stefan Harbich, bareos-users
Have you looked at a vpn between the sites? 

Sent from my iPhone
Brock Palen

On May 19, 2026, at 1:18 PM, Stefan Harbich <stefan....@harnet.de> wrote:


--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bareos-users/12f1a2ed-ac65-4e4f-91de-1ac282f56fafn%40googlegroups.com.

stefan.harbich

unread,
May 19, 2026, 2:43:46 PMMay 19
to Brock Palen, 'Brock Palen' via bareos-users
Hello,
our locations are connected via VPN. Additionally, all critical communication connections should be encrypted using TLS. This also applies to backup connections within the VPN. Man-in-the-middle attack.
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/F1uPV-IYY8s/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/C56C5FC6-7E7B-4CC2-BD5D-98D2C61F4845%40mlds-networks.com.

Bruno Friedmann (bruno-at-bareos)

unread,
May 26, 2026, 8:45:52 AMMay 26
to bareos-users
Hi Stefan you might have missed Andreas answer in the other thread

Andreas Rogge
unread,
19 May 2026, 18:44:15 (7 days ago) 

Am 19.05.26 um 01:03 schrieb Stefan Harbich:
> i started a large backup via pgbouncer. Unfortunately, the backup is
> failing.
The missing table is a session-local temporary table. If the connection
is lost or bgbouncer for some reason puts the Bareos connection onto
another backend session this will happen.
For pgbouncer that means you will have to run in session pooling mode,
neither transaction pooling nor statement pooling will work with Bareos.
Could you double-check that?



Stefan Harbich

unread,
Jun 1, 2026, 6:27:31 PM (8 days ago) Jun 1
to bareos-users
Hello everyone,

i have decided to switch to Bacula.
It is exactly the right fit for my extensive, global backup strategy.
I was very quickly able to connect with database developers who helped me,
fine-tune the encrypted connections for an HA cluster.
Now, the connection between the Director and the PostgreSQL database is also running in encrypted mode.
And this holds true even for backups that take over two hours to complete.
I also find the Bacularis WebUI to be superior to the BareosWebUI.
Nevertheless, I wish you continued success with your project.
Thank you for your support.

Best regards, Stefan Harbich

Andreas Rogge

unread,
Jun 2, 2026, 10:49:33 AM (8 days ago) Jun 2
to bareos...@googlegroups.com
Hi Stefan,

it's sad to see you go, especially as you added a lot of value to the
list over the years.

I'm really surprised you couldn't get things running with pgbouncer tbh,
because the setup is pretty straightforward. I had happily helped you
getting it up and running, but you never responded to my message asking
you about the pooling mode.
Having said that, sharing (parts of) a non-working configuration is
usually a great approach to have an issue pinpointed.

I wish you all the best and really hope you never run into the issues
that made us disable TLS on the PostgreSQL connection.

Best Regards,
Andreas
--
Andreas Rogge andrea...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-86
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

Philipp Storz

unread,
Jun 2, 2026, 10:57:57 AM (8 days ago) Jun 2
to bareos...@googlegroups.com
Hello Stefan,

we are aware that the Bareos WebUI needs some modernization, and we are intensively working on it.

I did a presentation about the new WebUI that we are working on in our last bareos experts meeting. 
A video of the presentation is published in our youtube channel:


We are always happy to get feedback.

Best regards,

Philipp


Am 02.06.26 um 00:27 schrieb Stefan Harbich:
To view this discussion visit https://groups.google.com/d/msgid/bareos-users/70bb7030-87b9-41c4-b948-38eb836e29acn%40googlegroups.com.


-- 
Mit freundlichen Grüßen

 Philipp Storz                             philip...@bareos.com
 Bareos GmbH & Co. KG                      Phone: +49 221 63 06 93-92
 http://www.bareos.com

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

 Die "dass IT GmbH" wurde mit der "Bareos GmbH & Co. KG" verschmolzen,
 siehe https://www.bareos.com/de/dassit-verschmelzung/
Reply all
Reply to author
Forward
0 new messages