Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PostGIS Cookbook
  • Table Of Contents Toc
PostGIS Cookbook

PostGIS Cookbook

By : Paolo Corti, Bborie Park
4.6 (12)
close
close
PostGIS Cookbook

PostGIS Cookbook

4.6 (12)
By: Paolo Corti, Bborie Park

Overview of this book

An easy-to-use guide, full of hands-on recipes for manipulating spatial data in a PostGIS database. Each topic is explained and placed in context, and for the more inquisitive, there are more details of the concepts used. If you are a web developer or a software architect, especially in location-based companies, and want to expand the range of techniques you are using with PostGIS, then this book is for you. You should have some prior experience with PostgreSQL database and spatial concepts.
Table of Contents (13 chapters)
close
close
12
Index

Migrating a PostGIS database to a different server


At some point, user databases need to be migrated to a different server. This need for server migration could be due to a new hardware or database-server software upgrade.

The following are the three methods available for migrating a database:

  • Dump and restore the database with pg_dump and pg_restore

  • Perform an in-place upgrade of the database with pg_upgrade

  • Perform streaming replication from one server to another

Getting ready

In this recipe, we will use the dump and restore methods to move user data to a new database with a new PostGIS installation. Unlike the other methods, this method is the most foolproof, works in all situations, and stores a backup in case things don't work as expected.

How to do it...

On the command line, perform the following steps:

  1. Though a backup file was created in this chapter's third recipe, create a new backup file by executing the following command:

    > pg_dump -f chapter10.backup -F custom chapter10
    
  2. Create a...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PostGIS Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon