Open jannikw opened 4 years ago
Any update on this?
hmm. Need to look at how the image is built. Any insight to this is appreciated.
This is not really fixable by adjusting the image, since you would have to ship every version of pg_dump
as it is recommended to create the database dump with the exact version the database is running at. Though the latest version of pg_dump
should be able to produce dumps for every previous version (up to some point), it is not guaranteed that these dumps can be restored with an older version, possibly the version the database is actually running at. This would kind of defeat the purpose of a backup if you cannot restore it :D
See https://www.postgresql.org/docs/10/app-pgdump.html:
Because pg_dump is used to transfer data to newer versions of PostgreSQL, the output of pg_dump can be expected to load into PostgreSQL server versions newer than pg_dump's version. pg_dump can also dump from PostgreSQL servers older than its own version. (Currently, servers back to version 8.0 are supported.) However, pg_dump cannot dump from PostgreSQL servers newer than its own major version; it will refuse to even try, rather than risk making an invalid dump. Also, it is not guaranteed that pg_dump's output can be loaded into a server of an older major version — not even if the dump was taken from a server of that version. Loading a dump file into an older server may require manual editing of the dump file to remove syntax not understood by the older server. Use of the --quote-all-identifiers option is recommended in cross-version cases, as it can prevent problems arising from varying reserved-word lists in different PostgreSQL versions.
So maybe the solution is to run pg_dump
in the database container itself like suggested in #29
So maybe the solution is to run
pg_dump
in the database container itself like suggested in #29
@einarf Is there any progress on this? Trying to use rcb with postgres 13.6. The suggestion in #29 seems to be a good solution?
pg_dump
is only backwards compatible not forward compatible. You can connect to and backup postgres databases for which the version is <= to the installed version ofpg_dump
. When attempting to backup a newer version the following error is displayed:Running
pg_dump --version
with the current docker image shows version11.7
meaning postgres databases with major version 12 can't be backed up.