From: | bricklen <bricklen(at)gmail(dot)com> |
---|---|
To: | Huan Ruan <huan(dot)ruan(dot)it(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Copy one database to another server |
Date: | 2013-05-02 22:25:05 |
Message-ID: | CAGrpgQ9R-_cD5DDYgfZzfjvaNW0pAQd8P=oPhRrtnND-oa9gbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, May 2, 2013 at 3:01 PM, Huan Ruan <huan(dot)ruan(dot)it(at)gmail(dot)com> wrote:
> create a new db using the current one as a template. Easy to do and speed
> is acceptable. A bit downtime is ok, but it's only on the current server.
> Is there a way to move it to anther server?
FWIW, I recently set up a 160GB clone by simply piping from pg_dump over
the network into psql, alleviating the need to dump to disk. In my case,
the server did not have enough space to hold the pg_dump, so I had to
stream it.
pg_dump -Fp your_db | psql -h new_server -U postgres your_new_db
You could also search the archives for caveats and other (and safer) ways
to do this.
From | Date | Subject | |
---|---|---|---|
Next Message | Nghia Truong | 2013-05-03 13:45:01 | Problem: pg_hba.conf is automatically rewritten every day |
Previous Message | Steve Crawford | 2013-05-02 22:19:35 | Re: Copy one database to another server |