-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote DB container issues #968
Comments
As you are trying to set up streaming of WALs, you should set Regarding the postgres server crashing, you'll have to find more information inside the container, probably increasing the log level or checking for core dumps. I would also check if you can connect directly to the database and run queries on it. |
okay, I recreated the slot in the meantime and all of a sudden So it seems good from that perspective. To address what you told me to check:
postgres docker logsIn terms of interesting things, WALs are not being saved properly on a backup server - I mean there is a file
When trying to perform a I think it is due to no WALs in |
To get WALs in the |
Okay, I did what you said and it achieved starting a backup but it had been interrupted due to connection termination which couldn't be reconnected. I can't provide logs and output, because I already cleaned them up - it was a while ago and I hoped it wasn't one-time event, but it was. I was looking for setting up longer For now, I enabled logs for connections and disconnections and there this happens when performing a
As far as I can read and I don't know what it looks like, I would see it seems like a streaming problem (the time is right for Is it normal that it has so many And of course, it is not related to empty |
Those are streaming connections where https://www.postgresql.org/docs/current/protocol-replication.html I can't find anything useful in those logs. You'll probably have to increase the log_level in Postgres. My suggestion is to bring this to the pgsql-general mailing list or the Postgres Slack/Discord channels. |
Hi,
I think this is more the question (skill issue) than a problem of this tool.
Config
It is possible that I missunderstood the documentation, but I think it is possible to configure barman like that:
Servers
Files
Global barman:
_[barman]
barman_user = barman
configuration_files_directory = /etc/barman.d
barman_home = /var/lib/barman
log_file = /var/log/barman/barman.log
log_level = DEBUG
compression = gzip
immediate_checkpoint = true
basebackup_retry_times = 3
basebackup_retry_sleep = 30
check_timeout = 60
last_backup_maximum_age = 1 DAYS_
Server config:
[server1]
ssh_command = ssh [email protected] -p 5422
conninfo = host=192.168.76.10 port=5432 user=dbadmin dbname=my-db
streaming_conninfo = host=192.168.76.10 port=5432 user=streaming_barman
backup_method = rsync
reuse_backup = link
backup_options = concurrent_backup
streaming_archiver = on
slot_name = barman
create_slot = auto
parallel_jobs = 2
Problem
The main problem I see is I cannot perform a backup, but it seems like underlying problem is missconfiguration or something else with WAL. Also when I execute the
check
command, it looks like it crashes database and it is going in recovery mode (recover itself then). It also happens when trying to performbackup
, but I don't see anything wrong in postgres container logs, only that:LOG: server process (PID 1858) exited with exit code 255
, whe trying thatbackup
orcheck
.Here are the results of
check
$ barman check server1
Server server1:
WAL archive: FAILED (please make sure WAL shipping is setup)
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: FAILED (interval provided: 1 day, latest backup age: No available backups)
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: FAILED (there are 7 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
archiver errors: OK
The results of
backup
gives either information that it cannot be performed or that database is in recovery.P.S.
I already spend too much time on this. Before that I tried
pgbackrest
but I gave up on that. I will be gratefull for even the direction of further steps.I am fairly new to postgres and never performed any backup with it.
ssh
paswordlessly between them - I canThe text was updated successfully, but these errors were encountered: