0

I am having an issue "resetting" or fixing a backup server I have in BARMAN:

-bash-4.2$ barman check *server-name*
Server *server-name*:
        PostgreSQL: OK
        superuser or standard user with backup privileges: OK
        wal_level: OK
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        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)
        not in recovery: OK
        systemid coherence: OK
        archive_mode: OK
        archive_command: OK
        continuous archiving: FAILED
        archiver errors: FAILED (duplicates: 1, unknown: 1)

Looking at the BARMAN documentation, it gives a procedure to stop WAL logging.

The cron command ensures that WAL streaming is started for those servers that have requested it, by transparently executing the receive-wal command.

In order to stop the operations started by the cron command, comment out the cron entry and execute:

barman receive-wal --stop SERVER_NAME

You might want to check barman list-server to make sure you get all of your servers.

How do we "comment out the cron entry"? I don't see it in the barman user crontab if I do a crontab -l. I assume we use some form of barman cron but I dont see any options?

Currently I am not backing up this server, but the WAL logs are still getting copied.

Any ideas or help would be very appreciated! Thanks!

1
  • How did you install barman?
    – jjanes
    Jul 31, 2021 at 17:40

1 Answer 1

0

If you used a package manager, the package cron tab will be installed for the system, and not for the individual user. So crontab -l couldn't get at it. It will probably be somewhere like /etc/cron.d/barman

However, it doesn't look like you are using streaming in the fist place. I think you are set up to use archive_command to push log files from the database server to the barman server, not to stream them. So you would not have a wal receiver running in the first place.

The barman cron subcommand will start the WAL receiver if streaming is configured and it is not already running, will process any accumulated WAL in "incoming" or "streaming" since last time it was run (verify it, catalog it, compress it, and move it to the 'wal' directory), verifies it has all the WAL needed for any backups which have not yet been verified (are "waiting for WAL"), and deletes any backups no longer needed for your retention policy. One thing it will not do is actually start a backup. That is done either manually, or through your own cron jobs.

I don't think you need to do anything to reset. Just run barman backup server-name

1
  • That makes sense... when I looked at the /etc/cron.d/barman file it had: <br/> -bash-4.2$ cat barman <br/> # m h dom mon dow user command <br/> * * * * * barman [ -x /usr/bin/barman ] && /usr/bin/barman -q cron Maybe I didn't read the barman documentation well enough, but what does that cron on the barman server side actually do? I do appreciate your answer and I will look at the server side config to try to deal with the WAL logs. Is there a way to "reset" my config to start backups via barman again? Aug 2, 2021 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.