[postgis-users] moving a PostGIS db from one server to another

Puneet Kishor punk.kish at gmail.com
Sat Feb 11 12:57:36 PST 2012


I am trying to move a PostGIS db from a computer with 9.0.5/1.5.3 to another computer with 9.1.2/1.5.3. All my data are in non-public schema (several of them). Here are my steps

	# On old server
	$pg_dump \
		--ignore-version \
		--username=postgres \
		--format=c \
		--blobs \
		--verbose \
		--exclude-schema=public \
		--file=dbdump db
	$scp dbdump newserver:~
	
	# On the new server
	$createdb db
	$createlang plpgsql db
	$psql -d db -f /path/to/postgis.sql
	$psql -d db -f /path/to/spatial_ref_sys.sql
	$pg_restore --format=c --file=dbdump
	
The dump file is ~3 GB. `pg_restore` seems to have been going on for ever. Before I kill it and try something else, want to confirm if the above steps are all that is required.



--
Puneet Kishor


More information about the postgis-users mailing list