Hi Stefan, this plugin is known to be buggy. I am on the way to fix it and make it functional with PG15. So please be patient.
Joerg stefan....@harnet.de schrieb am Donnerstag, 23. Februar 2023 um 18:14:14 UTC+1: > Hello, > my python plugin postgresql backup fails with the following error message: > ... > 23-Feb 17:53 bareos-dir JobId 305: Start Backup JobId 305, > Job=backup-postgresql.2023-02-23_17.53.03_03 > 23-Feb 17:53 bareos-dir JobId 305: Connected Storage daemon at > bareos.intern.harnet.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 > TLSv1.3 > 23-Feb 17:53 bareos-dir JobId 305: Encryption: > TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 > 23-Feb 17:53 bareos-dir JobId 305: Probing client protocol... (result will > be saved until config reload) > 23-Feb 17:53 bareos-dir JobId 305: Connected Client: bareos-fd at > dsme01.intern.harnet.de:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 > TLSv1.3 > 23-Feb 17:53 bareos-dir JobId 305: Handshake: Immediate TLS > 23-Feb 17:53 bareos-dir JobId 305: Encryption: > TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 > 23-Feb 17:53 bareos-dir JobId 305: Using Device "FileStorage" to write. > 23-Feb 17:53 dsme01-fd JobId 305: Connected Storage daemon at > bareos.intern.harnet.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 > TLSv1.3 > 23-Feb 17:53 dsme01-fd JobId 305: Encryption: > TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 > 23-Feb 17:53 dsme01-fd JobId 305: Extended attribute support is enabled > 23-Feb 17:53 dsme01-fd JobId 305: ACL support is enabled > 23-Feb 17:53 bareos-sd JobId 305: Volume "Full-0050" previously written, > moving to end of data. > 23-Feb 17:53 bareos-sd JobId 305: Ready to append to end of Volume > "Full-0050" size=21480841247 > 23-Feb 17:53 dsme01-fd JobId 305: python3-fd-mod: Connected to Postgres > version 120013 > 23-Feb 17:53 dsme01-fd JobId 305: python3-fd-mod: dataDir: > /var/lib/postgresql/12/main/base/ > 23-Feb 17:53 dsme01-fd JobId 305: Error: python3-fd-mod: Could net get > stat-info for file /var/lib/postgresql/12/main/base/backup_label: "[Errno > 2] Datei oder Verzeichnis nicht gefunden: > '/var/lib/postgresql/12/main/base/backup_label'"23-Feb 17:53 dsme01-fd > JobId 305: Fatal error: bareosfd: Traceback (most recent call last): > File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 42, in > start_backup_file > return bareos_fd_plugin_object.start_backup_file(savepkt) > File "/usr/lib/bareos/plugins/BareosFdPluginPostgres.py", line 396, in > start_backup_file > return super(BareosFdPluginPostgres, self).start_backup_file(savepkt) > File "/usr/lib/bareos/plugins/BareosFdPluginLocalFilesBaseclass.py", > line 118, in start_backup_file > mystatp.st_mode = statp.st_mode > UnboundLocalError: local variable 'statp' referenced before assignment > > 23-Feb 17:53 dsme01-fd JobId 305: Error: python3-fd-mod: Could not read > Label File /var/lib/postgresql/12/main/base/backup_label: [Errno 2] Datei > oder Verzeichnis nicht gefunden: > '/var/lib/postgresql/12/main/base/backup_label' > 23-Feb 17:53 dsme01-fd JobId 305: Error: python3-fd-mod: pg_stop_backup > statement failed: 'CHECKPOINT LOCATION' > 23-Feb 17:53 bareos-sd JobId 305: Releasing device "FileStorage" > (/media/usb/backups/storage). > 23-Feb 17:53 bareos-sd JobId 305: Elapsed time=00:00:07, Transfer rate=0 > Bytes/second > 23-Feb 17:53 bareos-dir JobId 0: Fatal error: Network error during CRAM > MD5 with 192.168.20.26 > 23-Feb 17:53 bareos-dir JobId 0: Fatal error: Director unable to > authenticate with Storage daemon at "bareos.intern.example.com:9103". > Possible causes: > Passwords or names not the same or > TLS negotiation problem or > Maximum Concurrent Jobs exceeded on the SD or > SD networking messed up (restart daemon). > 23-Feb 17:53 bareos-dir JobId 305: Error: Bareos bareos-dir > 22.0.3~pre7.b16be41bc (21Feb23): > Build OS: Debian GNU/Linux 11 (bullseye) > JobId: 305 > Job: backup-postgresql.2023-02-23_17.53.03_03 > Backup Level: Full > Client: "bareos-fd" 22.0.3~pre7.b16be41bc (21Feb23) > Debian GNU/Linux 11 (bullseye),debian > FileSet: "plugin-postgresql" 2023-02-23 17:53:03 > Pool: "Full" (From command line) > Catalog: "MyCatalog" (From Client resource) > Storage: "File" (From Job resource) > Scheduled time: 23-Feb-2023 17:53:03 > Start time: 23-Feb-2023 17:53:05 > End time: 23-Feb-2023 17:53:24 > Elapsed time: 19 secs > Priority: 10 > FD Files Written: 0 > SD Files Written: 0 > FD Bytes Written: 0 (0 B) > SD Bytes Written: 0 (0 B) > Rate: 0.0 KB/s > Software Compression: None > VSS: no > Encryption: no > Accurate: no > Volume name(s): > Volume Session Id: 14 > Volume Session Time: 1677071400 > Last Volume Bytes: 0 (0 B) > Non-fatal FD errors: 3 > SD Errors: 0 > FD termination status: Fatal Error > 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 *** > ... > Here is my config > ... > root@dsme01:~# cat /etc/bareos/bareos-dir.d/fileset/plugin-postgresql.conf > FileSet { > Name = "plugin-postgresql" > Include { > Options { > compression=GZIP > signature = MD5 > } > Plugin = "python" > ":module_name=bareos-fd-postgres" > ":dbHost=127.0.0.1" > ":dbuser=postgres" > ":postgresDataDir=/var/lib/postgresql/12/main/base" > ":walArchive=/media/usb/backups/ > dsme01.intern.example.com/postgresql/wal_archives/" > } > } > ... > What's wrong here? > Greetings from Stefan Harbich > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/9e5eb0c7-2928-4291-a14f-8434366b52b1n%40googlegroups.com.