pg_dumpall: unrecognized option '--if-exists' #497
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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 yoursource_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.
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.
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