Re: Table update: restore or replace? - Mailing list pgsql-general

From Tom Lane
Subject Re: Table update: restore or replace?
Date
Msg-id 28923.1557868239@sss.pgh.pa.us
Whole thread Raw
In response to Re: Table update: restore or replace?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Table update: restore or replace?
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> If you where to restore at the file level I would:
> 1) Stop the server.
> 2) Move the existing content of /var/lib/pgsql/10/data/ somewhere else 
> just to be safe.
> 3) Copy in the backup.

Yeah.  You can't just selectively copy files, because the data files
are dependent on the contents of the pg_xact transaction log; it's
all or nothing.

Also, I don't know what method you've been using to make file-level
backups, but they're really pretty worthless unless you (a) stop
the server or (b) use a filesystem snapshot.  Otherwise you're very
likely to have inconsistent data.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Table update: restore or replace?
Next
From: Rich Shepard
Date:
Subject: Re: Table update: restore or replace?