Hello Angelo,
> backup_method: rsync
>
> I was able to finish a backup ( the first one) but I am really struggling from that moment ( week ago)
>
> Any idea?
In the first message you sent a
barman show-server output which shows the
backup_method is
rsync.
> sorry I haven't add the error
>
> pg_basebackup: checkpoint completed
> NOTIFICA: base backup done, waiting for required WAL segments to be archived
> ATTENZIONE: still waiting for all required WAL segments to be archived (60 seconds elapsed)
> HINT: Check that your archive_command is executing properly. You can safely cancel this backup, but the database backup will not be usable without all the WAL > segments.
Then, the output messages that you shared in the second reply shows the output of
pg_basebackup, which is only used by Barman when
backup_method is
postgres.
Also, keep in mind that the output you shared doesn't necessarily indicate an error. The
pg_basebackup application is simply issuing warnings from time to time to inform that the WALs required for consistency of the backup were not yet archived by the
archive_command.
That may be caused by different factors, to name a few:
- archive_command is failing.
- There is no load in the Postgres server, so it never switches the WAL, thus the WAL cannot be archived.
- There is too much load in the Postgres and/or Barman server, in such a way Postgres is not able to send the WAL archive as fast as one would expect.
> 2025-02-18 11:43:22.226 CET [4922] ATTENZIONE: still waiting for all required WAL segments to be archived (480 seconds elapsed)
> 2025-02-18 11:43:22.226 CET [4922] SUGGERIMENTO: Check that your archive_command is executing properly. You can safely cancel this backup, but the database backup will not be usable without all the WAL segments.
>
> Starting backup using rsync-exclusive method for server pgintermedia in /barman-pool/barman1/pgintermedia/base/20250218T110305
> Backup start at LSN: 8F5/CB536330 (00000030000008F5000000CB, 00536330)
> Starting backup copy via rsync/SSH for 20250218T110305
> Copy done (time: 29 minutes, 51 seconds)
> Asking PostgreSQL server to finalize the backup.
>
> is it possible that barman 3.12.1 is too new? Is it a stable version?
Then you shared this output, which has a mix of output messages: some messages coming from a
rsync-based backup, and some coming from a
pg_basebackup-based backup.
With that in mind, we guess you have more than one Barman server configured in your Barman installation, each one using a different backup method.
> I still have errors when I try to run the backup for an istance postgres 12
> I see from the log this query below but if I run it manually a have an error like " .. not exclusive backup running"
>
> SELECT location, (pg_walfile_name_offset(location)).*, now() AS timestamp FROM pg_stop_backup() AS location
>
> base backup always ok
>
> What could it be?
Hard to say what could be causing the issue, the information shared along this mail thread is not clear enough to troubleshoot the issue.
About the manual execution of
pg_stop_backup, that's expected to fail.
That function will only succeed if executed in the very same session where
pg_start_backup was run.
Also, that's not expected to be executed by you, but by Barman as part of the base backup copy process.
> I managed to solve this "barman's misbehave" using the template barman provides for rsync and restarting the postgresql service with systectl restart postgres
>
> Very weird situation thought
> I hope this post might be useful for the group
In order to understand what was the issue that you faced, we would need a better tracking of the situation, understanding for example what was present in the logs and what exact actions you took between the failed and successful attempts.
The information that we have in this mail thread is not enough for troubleshooting the issue.
In any case, we are happy to know your backups are now functional.
Best regards,
Israel.