PowerShell script to replicate Mendix cloud database to local Postgres database
- Run
MxDB2Local.ps1PowerShell script - Enter PostgresSQL username (default: postgres) *
- Enter PostgresSQL password *
- Enter Mendix username/email *
- Enter Mendix API key (?) *
- Select the app
- Select the environment
- Select the snapshot
- Bask in the glory!
* Only required when running for the first time
- Login to Mendix Developer portal
- Click profile image at top > Account settings > API Keys > Create new API key

- Give it a friendly description > Generate API key
- Copy the key and paste into the script prompt
- Windows > Search "Environment" > Edit the system environment variables

- Environment Variables... > Select Path under 'System variables' > Edit...

- Browse... > Select the
/binfolder of your Postgres installation > OK on all previous Windows (egC:\Program Files\PostgreSQL\13\bin)
- Open Command Prompt and try running
psql --version. It should return like below