How To Use Your Mendix Cloud Database locally

Recently I was asked to help out on a Mendix project. In order to test changes in the Business Modeler, I needed to get a copy of the data from the Acceptance environment so I could use it locally. I hadn’t needed to do this before so I asked my colleague, Greg Dobson, to put together a quick guide to help walk me through the process since he had already gone through this process. I thought it made sense to share on my blog for others that might need to do this.

Step 1 – Install PostgreSQL server

Navigate to their home page and click on 'Downloads'.

Select your distribution. We’re going to show the “Windows” process since the Business Modeler currently only runs on Windows so we know you’ll at least have access to a Windows OS.

Once downloaded, run the installation and accept the defaults. You can change the path of the install but leave the rest as-is.

Step 2 – Download the Mendix cloud database

Navigate to the Mendix Developer Portal.

Once you’ve selected your project, click on the ‘Deploy’ menu item, then the ‘Backup’ tab.

From here, select your environment that you want to make a local copy of, select the deployment you want to make a copy of (the top one will be the current deployment) and press the ‘Download Backup’ button.

In the popup page, download the “Database” option.

Step 3 – Setup your local database

Run the PgAdmin III utility.

Once launched, you might need to connect to your PostgrSQL database engine on your localhost. Simply right-click (or equivalent) on that database and select “Connect”.

After the connection, right-click on ‘Databases’ and select “New Database…”. Give it a name and click “OK”.

Step 4 – Restore the downloaded backup to your new database

Right-click on your new database and select the ‘Restore’ option.

Click on the ellipse button and navigate to and select your backup file downloaded from the cloud. Click ‘Restore’.

This process will take time. Continue with something else in the meantime and check back now and then to see if the screen shows complete or “Process returned exit code…”. If you see that the process is over. The ‘Restore’ button will be selected again but don’t choose that. Just select the ‘Cancel’ button.

Step 5 – Configure the Project in the Modeler

Launch the application in your Business Modeler and double-click on “Project/Settings”.

Select ‘New’ on the ‘Configurations’ tab.

Fill in the ‘Database’ form with the following settings:

  • Type: PostgreSQL
  • URL: localhost
  • Database Name: <your DB name>
  • User Name: <the Admin DBO account setup on you DB>
  • Password: <the Password you setup.>
  • Press ‘OK’

There you are. A step-by-step procedure for moving the Database from the cloud in Mendix to your local machine. Thanks, Greg!