Problems getting a local database uploaded to a node

0
Hi, I'm trying to upload a local db to a node. I'm trying to follow the info on this page https://docs.mendix.com/developerportal/operate/restore-backup, chapter 5. One of the first issues is the backup of the local db. I've a Postgres db 9.16.21 and the pg_dump is 9.6.21 as well. The documentation states that it must be 9.6.17 or lower. I've not been able yet to find pg_dump 9.6.17 to download. And, if I would, would it work with a 9.6.21 db … the 9.5.25 pg_dump version is not working – incompatible versions. So, my first questions are: Is it possible to upload a backup of a local db version Postgres 9.6.21 version to a Mendix node at all? How do I create the db? If it is true that I can only use a pg_dump 9.6.17 version and this works in combination with a 9.6.21 db, where can I get this pg_dump 9.6.17 version?   Follow on questions will be about the .metadata file and how to determine the values that must be added to this file. But that's for later, after I actually have a backup that should work :-) Thanks for reading! Toon Verschoor
asked
1 answers
1

It’s possible the documentation is outdated. I would say just try with your current backup file.

 

If it doesn’t work and you need it exported as 9.6.17:

  1. First, export your current data from 9.6.21 to SQL format ( https://stackoverflow.com/questions/37984733/postgresql-database-export-to-sql-file/37985097 )
  2. Second run postgresql server 9.6.17 (either via docker on windows or Linux, or via WSL)
    1. or try 9.5.25 from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads (it’s older so should be fine)
  3. Restore your exported data in SQL format into 9.6.17
  4. export the data as described in Mendix docs with pg_dump

 

The trick is to export to SQL format so that it’s PG version independent.

 

If I recall the metadata file is ignored when you upload an archive to the backup system in Mendix cloud. It’s only for your reference.

Good luck

answered