Re: How to Backup like in mysql or ms sql server

From: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Tino Wildenhain <tino(at)wildenhain(dot)de>
Subject: Re: How to Backup like in mysql or ms sql server
Date: 2006-07-02 19:00:56
Message-ID: 200607021200.56589.uwe@oss4u.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sunday 02 July 2006 01:42, Tino Wildenhain wrote:
> Uwe C. Schroeder wrote:
> > 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).
>
> Well, err. thats not completely true with current postgres versions:
>
> http://www.postgresql.org/docs/current/static/backup-online.html
>
> ...

Ok, you're correct on that one. However I'd rather not encourage someone to
mess with WAL and filesystem based backups when s/he hasn't even heard of
pg_dump yet, simply because I can already see the next question popping
up ... like in "I had a failure and wanted to restore my backup, but
everything is messed up now and I can't get it running - help please!" :-)
With a standard pg_dump that won't happen, so it's IMHO the safest way to deal
with the backup problem for a newbie.

On a side-note: that piece of documentation is pretty heavy reading and
assumes quite some knowledge about how a DB system like postgresql works
internally. For me it's always the least sophisticated approach that solves a
given problem. The good old KISS principle applies again :-)

Uwe

>
> >> 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?
>
> Well, thats in the docs ;) (or see above)
>
> btw, just "copy and paste" w/o preparation is
> dangerous with the above databases too.
>
> Regards
> Tino

--
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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Niklas Johansson 2006-07-02 19:13:33 Re: Default directory for postgres user?
Previous Message Agent M 2006-07-02 18:56:15 Re: Default directory for postgres user?