pg_dumpall: unrecognized option '--if-exists' #497

Closed
opened 2022-02-09 04:01:34 +00:00 by Firesphere · 4 comments

What I'm trying to do and why

Include Postgres 9.2 dumps in the backup, because databases are important.

Steps to reproduce (if a bug)

Attempt to backup a system with a Postgres hook, on Postgres <10

Actual behavior (if a bug)

Postgres shows an error that --if-exists is not a valid command.
This is due to the PG on this server is older (9.x), which I sadly can't do anything about.

Expected behavior (if a bug)

Actually dump out a database

Other notes / implementation ideas

Environment

borgmatic version: [version here]

1.5.22

borgmatic installation method: [e.g., Debian package, Docker container, etc.]

Pip3

Borg version: [version here]

Borg 1.1.17

Python version: [version here]

python 3.6.8

Database version (if applicable): [version here]

pg_dumpall (PostgreSQL) 9.2.24

operating system and version: [OS here]
CentOS 7

### What I'm trying to do and why Include Postgres 9.2 dumps in the backup, because databases are important. #### Steps to reproduce (if a bug) Attempt to backup a system with a Postgres hook, on Postgres <10 #### Actual behavior (if a bug) Postgres shows an error that --if-exists is not a valid command. This is due to the PG on this server is older (9.x), which I sadly can't do anything about. #### Expected behavior (if a bug) Actually dump out a database #### Other notes / implementation ideas #### Environment **borgmatic version:** [version here] 1.5.22 **borgmatic installation method:** [e.g., Debian package, Docker container, etc.] Pip3 **Borg version:** [version here] Borg 1.1.17 **Python version:** [version here] python 3.6.8 **Database version (if applicable):** [version here] pg_dumpall (PostgreSQL) 9.2.24 **operating system and version:** [OS here] CentOS 7
Owner

I'm really sorry, but that version of PostgreSQL is no longer supported by the PostgreSQL organization, and so isn't supported by borgmatic's database hooks. I admit that this limitation could be documented better. In general, borgmatic "officially" supports software that is actively supported by its maintainers, as this small volunteer effort has limited time. For instance, borgmatic just dropped support for Python 3.6, which was recently end-of-lifed.

As a work-around, if you still want to use borgmatic, you could manually dump the database with a before_backup hook into a location specified in your source_directories so that the dump will be included in each backup. However, that wouldn't make use of any of borgmatic's built-in database dump or restore functionality.

Thanks for your understanding.

I'm really sorry, but that version of PostgreSQL is no longer [supported by the PostgreSQL organization](https://www.postgresql.org/support/versioning/), and so isn't supported by borgmatic's database hooks. I admit that this limitation could be documented better. In general, borgmatic "officially" supports software that is actively supported by its maintainers, as this small volunteer effort has limited time. For instance, borgmatic just dropped support for Python 3.6, which was recently end-of-lifed. As a work-around, if you still want to use borgmatic, you could manually dump the database with a `before_backup` hook into a location specified in your `source_directories` so that the dump will be included in each backup. However, that wouldn't make use of any of borgmatic's built-in database dump or restore functionality. Thanks for your understanding.
witten added the
question / support
label 2022-02-09 05:12:56 +00:00
Author

Totally understandable. I sort-of expected this answer, but it never hurts to ask ;)

I wish I didn't have to deal with this old pile... but meh, such is life.

Totally understandable. I sort-of expected this answer, but it never hurts to ask ;) I wish I didn't have to deal with this old pile... but meh, such is life.
Owner

Yup, I've been there. Good luck.. whatever you end up doing! And FWIW, the before_backup dump / after_backup remove dump method was the only way to use databases with borgmatic until not too long ago (~2 years ago).

Yup, I've been there. Good luck.. whatever you end up doing! And FWIW, the `before_backup` dump / `after_backup` remove dump method was the *only* way to use databases with borgmatic until not too long ago (~2 years ago).
Author

Yup, I've been there. Good luck.. whatever you end up doing! And FWIW, the before_backup dump / after_backup remove dump method was the only way to use databases with borgmatic until not too long ago (~2 years ago).

This is my life now :D

> Yup, I've been there. Good luck.. whatever you end up doing! And FWIW, the `before_backup` dump / `after_backup` remove dump method was the *only* way to use databases with borgmatic until not too long ago (~2 years ago). This is my life now :D
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#497
No description provided.