[postgis-users] export
Stephen R. Crawford
src176 at psu.edu
Tue Oct 14 06:03:56 PDT 2014
Great, thanks to you both.
Stephen R. Crawford
Center for Environmental Informatics
The Pennsylvania State University
On Oct 14, 2014, at 8:58 AM, Ben Madin <ben at ausvet.com.au> wrote:
> If you mean from one postgis database to another postgis database I think you will find pg_dump most helpful using the -t flag for the table you want.
>
> If they are both on the same cluster:
>
> pg_dump -t myTable myDatabase1 | psql myDatabase2
>
> (caveat is make sure that the second database has postgis extension installed first)
>
> Otherwise, dump to a file
>
> pg_dump -t myTable myDatabase1 | gzip -9 > myTable.sql.gz
>
> unzip and reload into second database.
>
> cheers
>
> Ben
>
>
> On 14 October 2014 00:45, Stephen Crawford <src176 at psu.edu> wrote:
>> Hello All,
>>
>> I want to copy a postgis table from one database to another. Is dumping to a shapefile the best way to do this? Any other method? Pros and cons?
>>
>> Thanks,
>> Steve
>>
>> --
>> Stephen Crawford
>> Center for Environmental Informatics
>> The Pennsylvania State University
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
>
> --
>
> Ben Madin
> BVMS PhD, MANZCVS
>
> t : +61 8 6102 5535
> m : +61 448 887 220
> e : ben at ausvet.com.au
>
> AusVet Animal Health Services
> Western Australia
>
> www.ausvet.com.au
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141014/956dd393/attachment.html>
More information about the postgis-users
mailing list