Barman using old pg_start_backup on Postgresql-15
0
votes
1
answer
300
views
I'm trying to backup my server using barman but it's taking error on backup
here's the check
root@barman:~# barman check My_server
Server Postgres_UniContent:
PostgreSQL: OK
superuser or standard user with backup privileges: OK
PostgreSQL streaming: OK
wal_level: OK
replication slot: OK
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
backup minimum size: OK (0 B)
wal maximum age: OK (no last_wal_maximum_age provided)
wal size: OK (0 B)
compression settings: OK
failed backups: OK (there are 0 failed backups)
minimum redundancy requirements: OK (have 0 backups, expected at least 0)
ssh: OK (PostgreSQL server)
systemid coherence: OK
pg_receivexlog: OK
pg_receivexlog compatible: OK
receive-wal running: OK
archive_mode: OK
archive_command: OK
continuous archiving: OK
archiver errors: OK
you guys see everything is okay but then when I start backup
root@barman:~# barman backup My_server
Starting backup using rsync-concurrent method for server My_server in /barman/My_server/base/20241002T184311
ERROR: Backup failed issuing start backup command.
DETAILS: pg_start_backup command: function pg_start_backup(unknown, boolean, boolean) does not exist
LINE 1: ...heckpoint()) AS timeline, now() AS timestamp FROM pg_start_b...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
So, as I see it's using pg_start_backup(unknown, boolean, boolean) but in Postgresql-15 the function name changed into pg_backup_start(). But I already grant the function to barman user
grantee | function_schema | routine_name | privilege_type
---------+-----------------+-------------------------+----------------
barman | postgres | pg_backup_start | EXECUTE
barman | postgres | pg_backup_stop | EXECUTE
barman | postgres | pg_create_restore_point | EXECUTE
barman | postgres | pg_switch_wal | EXECUTE
(4 rows)
postgres=# GRANT EXECUTE ON FUNCTION pg_backup_start(text, boolean) to barman;
GRANT
postgres=# GRANT EXECUTE ON FUNCTION pg_backup_stop(boolean) to barman;
GRANT
postgres=# GRANT pg_checkpoint TO barman;
GRANT ROLE
here is the diagnose information
root@barman:/barman# barman diagnose
{
"global": {
"config": {
"barman_home": "/barman",
"barman_user": "barman",
"configuration_files_directory": "/etc/barman.d",
"errors_list": [],
"log_file": "/barman/barman.log",
"log_level": "DEBUG"
},
"system_info": {
"barman_ver": "2.18",
"kernel_ver": "Linux barman 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux",
"python_ver": "",
"release": "Distributor ID:\tUbuntu\nDescription:\tUbuntu 22.04.5 LTS\nRelease:\t22.04\nCodename:\tjammy",
"rsync_ver": "rsync version 3.2.7 protocol version 31",
"ssh_ver": "",
"timestamp": "Wed Oct 2 19:19:08 2024"
}
},
"servers": {
"My_server": {
"backups": {
"20241002T184311": {
"backup_id": "20241002T184311",
"backup_label": null,
"begin_offset": null,
"begin_time": null,
"begin_wal": null,
"begin_xlog": null,
"config_file": "/etc/postgresql/15/main/postgresql.conf",
"copy_stats": null,
"deduplicated_size": null,
"end_offset": null,
"end_time": null,
"end_wal": null,
"end_xlog": null,
"error": "failure issuing start backup command (pg_start_backup command: function pg_start_backup(unknown, boolean, boolean) does not exist)",
"hba_file": "/etc/postgresql/15/main/pg_hba.conf",
"ident_file": "/etc/postgresql/15/main/pg_ident.conf",
"included_files": null,
"mode": "rsync-concurrent",
"pgdata": "/pg_data/main",
"server_name": "My_server",
"size": null,
"status": "FAILED",
"systemid": "7412892106944724954",
"tablespaces": null,
"timeline": null,
"version": 150008,
"xlog_segment_size": 16777216
}
},
"config": {
"active": true,
"archiver": true,
"archiver_batch_size": 0,
"backup_directory": "/barman/My_server",
"backup_method": "rsync",
"backup_options": "concurrent_backup",
"bandwidth_limit": null,
"barman_home": "/barman",
"barman_lock_directory": "/barman",
"basebackup_retry_sleep": 30,
"basebackup_retry_times": 0,
"basebackups_directory": "/barman/My_server/base",
"check_timeout": 30,
"compression": null,
"conninfo": "host=IP_ADDRESS user=barman dbname=postgres",
"create_slot": "auto",
"custom_compression_filter": null,
"custom_compression_magic": null,
"custom_decompression_filter": null,
"description": "Univision content watch information collecting server",
"disabled": false,
"errors_directory": "/barman/My_server/errors",
"forward_config_path": false,
"immediate_checkpoint": false,
"incoming_wals_directory": "/barman/My_server/incoming",
"last_backup_maximum_age": null,
"last_backup_minimum_size": null,
"last_wal_maximum_age": null,
"max_incoming_wals_queue": null,
"minimum_redundancy": 0,
"msg_list": [],
"name": "My_server",
"network_compression": false,
"parallel_jobs": 2,
"path_prefix": "/usr/lib/postgresql/15/bin",
"post_archive_retry_script": null,
"post_archive_script": null,
"post_backup_retry_script": null,
"post_backup_script": null,
"post_delete_retry_script": null,
"post_delete_script": null,
"post_recovery_retry_script": null,
"post_recovery_script": null,
"post_wal_delete_retry_script": null,
"post_wal_delete_script": null,
"pre_archive_retry_script": null,
"pre_archive_script": null,
"pre_backup_retry_script": null,
"pre_backup_script": null,
"pre_delete_retry_script": null,
"pre_delete_script": null,
"pre_recovery_retry_script": null,
"pre_recovery_script": null,
"pre_wal_delete_retry_script": null,
"pre_wal_delete_script": null,
"primary_ssh_command": null,
"recovery_options": "",
"retention_policy": "window 30 d",
"retention_policy_mode": "auto",
"reuse_backup": null,
"slot_name": "on",
"ssh_command": "ssh postgres@IP_ADDRESS",
"streaming_archiver": true,
"streaming_archiver_batch_size": 0,
"streaming_archiver_name": "barman_receive_wal",
"streaming_backup_name": "barman_streaming_backup",
"streaming_conninfo": "host=IP_ADDRESS user=streaming_barman dbname=postgres",
"streaming_wals_directory": "/barman/My_server/streaming",
"tablespace_bandwidth_limit": null,
"wal_retention_policy": "simple-wal 30 d",
"wals_directory": "/barman/My_server/wals"
},
"status": {
"archive_command": "rsync -a %p barman@BARMAN_IPADD:/barman/My_server/incoming/%f",
"archive_mode": "on",
"archive_timeout": 0,
"archived_count": 6,
"checkpoint_timeout": 300,
"config_file": "/etc/postgresql/15/main/postgresql.conf",
"connection_error": null,
"current_archived_wals_per_second": 3.2541333136528836e-06,
"current_lsn": "A/CD000148",
"current_size": 34695948524.0,
"current_xlog": "000000010000000A000000CD",
"data_checksums": "off",
"data_directory": "/pg_data/main",
"failed_count": 0,
"has_backup_privileges": true,
"hba_file": "/etc/postgresql/15/main/pg_hba.conf",
"hot_standby": "on",
"ident_file": "/etc/postgresql/15/main/pg_ident.conf",
"is_archiving": true,
"is_in_recovery": false,
"is_superuser": true,
"last_archived_time": "Wed Oct 2 18:41:58 2024",
"last_archived_wal": "000000010000000A000000CC",
"last_failed_time": null,
"last_failed_wal": null,
"max_replication_slots": "4",
"max_wal_senders": "4",
"pg_receivexlog_compatible": true,
"pg_receivexlog_installed": true,
"pg_receivexlog_path": "/usr/lib/postgresql/15/bin/pg_receivewal",
"pg_receivexlog_supports_slots": true,
"pg_receivexlog_synchronous": false,
"pg_receivexlog_version": "15.8",
"pgespresso_installed": false,
"postgres_systemid": "7412892106944724954",
"replication_slot": [
"on",
true,
"A/CD000000"
],
"replication_slot_support": true,
"server_txt_version": "15.8",
"stats_reset": "Wed Sep 11 11:09:01 2024",
"streaming": true,
"streaming_supported": true,
"streaming_systemid": "7412892106944724954",
"synchronous_standby_names": [
""
],
"timeline": 1,
"wal_compression": "off",
"wal_keep_size": "0",
"wal_level": "replica",
"xlog_segment_size": 16777216,
"xlogpos": "A/CD000148"
},
"system_info": {
"kernel_ver": "Linux unicontent 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux",
"python_ver": "",
"release": "Distributor ID:\tUbuntu\nDescription:\tUbuntu 22.04.2 LTS\nRelease:\t22.04\nCodename:\tjammy",
"rsync_ver": "rsync version 3.2.7 protocol version 31",
"ssh_ver": ""
},
"wals": {
"last_archived_wal_per_timeline": {}
}
}
}
}
Please help me to troubleshoot this barman difficulties.
Asked by Mendbayar Alzakhgui
(11 rep)
Oct 2, 2024, 11:22 AM
Last activity: Oct 3, 2024, 06:27 AM
Last activity: Oct 3, 2024, 06:27 AM