From: | "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Joko Siswanto" <jokonet(at)gmail(dot)com> |
Subject: | Re: How to Backup like in mysql or ms sql server |
Date: | 2006-07-02 04:19:47 |
Message-ID: | 200607012119.48212.uwe@oss4u.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You can technically just copy & paste the postgresql data directory IF YOU
SHUT DOWN THE POSTMASTER FIRST! Be aware that this will only work for the
same version of postgresql. Also: this is not a good way to do it and I'd
encourage you not to use this as general means of backup (it's ok if you want
to create a quick clone of an existing database on a second machine -
provided that the platform and postgresql version on there is identical to
the source).
The proper way would be to use pg_dump (a tool that comes along every
postgresql installation - see the docs for usage), which will dump the data
and structure.
There is a second such utility program called pg_restore which will take the
dump-file created with pg_dump and restore it to a database of your choosing.
Those dumps will be functional between versions and platforms - so that's the
way to go.
UC
On Saturday 01 July 2006 21:01, Joko Siswanto wrote:
> Hi all,
>
> I'm new bie in postgresql.
> I use postgresql 8.1 windows version.
> How to back-up database in postgresql? Usually i use pgAdmin III by back-up
> and restore.
> Is there any way to back-up database like mysql or sql server we just copy
> and paste. Or maybe there is any tools to copy database when the service is
> shutdown.
>
> Where is postgresql put teh database files?
>
> Thanks all,
> Jokonet
--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2006-07-02 07:28:20 | Techdocs error (WAS: RE: Notes on converting from MySQL 5.0.x to PostgreSQL 8.1.4) |
Previous Message | Richard Broersma Jr | 2006-07-02 04:17:54 | Re: How to Backup like in mysql or ms sql server |