Search Postgresql Archives

Re: Need help on how to backup a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  Hi all,
>   I am trying to backup a large table with about 6 million rows. I want
> to
> export the data from the table and be able to import it into another
> table
> on a different database server (from pgsql 8.1 to 8.2). I need to
> export the
> data through SQL query 'cause I want to do a gradual backup.
>   Does pgsql have a facility for this?
>   Thanks in advance for your reply.
> 

Here's an easy solution:

psql -c "COPY command here" dbname | ssh user@xxxxxxxx "dd
of=/path/tbl.backup"

You can run this from your local server, and immediately pipe it over
a secure shell to the other server, and write it to a file there.
The /path/ you specify is local to the remote server.





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux