User Tools

Site Tools


map_suite_world_map_kit_sdk_postgresql_database_restore_guide

Restoring a PostgreSQL Database

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

Restoring, or creating a database from a PostgreSQL backup file can be accomplished in just a few steps.

Begin by opening PGAdmin and connecting to the server where you will be performing the restore. You can create a new database by right clicking the server name and using the “New Database…” dialog box.

Once you have a database to use, select that database

and right click the database name and select “Restore…”. Then from that dialog window browse to the .backup file you will be using to restore the database.

Once you've selected your file, click the “Restore” button, and the restore will begin.

Keep in mind that depending on the size of the backup file and the computer processing it, the restore could take a long time, maybe even over a day to complete.

Installing and Activating the Required Extensions

PostGis

You may need to install the PostGis extension in order to run spatial queries on the database. In order to do this, open Stack Builder, and select PostgreSQL 9.4 (x64)from the drop down and select next.

Expand the the Spatial Extensions option from the list, and select PostGIS 2.1 Bundle for PostgreSQL 9.4 (64 bit)

You can then view and/or change the destination they will be downloaded to.

You'll be presented with the option to confirm your choices. After doing so, select next.

Once the installation is complete, select close.

Activating PostGis

Create Extensions

The final step is creating the extensions in your database. To do this, open a new SQL editor window in your database. Add the code Create Extension postgis; and execute the statement.

Then replace the query with Create Extension hstore; and execute it as well.

Your database should be ready to use at this point.

map_suite_world_map_kit_sdk_postgresql_database_restore_guide.txt · Last modified: 2017/03/17 05:09 by tgwikiupdate