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

From Stephen Frost
Subject Re: Table update: restore or replace?
Date
Msg-id 20190515000851.GD6197@tamriel.snowman.net
Whole thread Raw
In response to Re: Table update: restore or replace?  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
Greetings,

* Rich Shepard (rshepard@appl-ecosys.com) wrote:
> That's why I thought of copying the entire data/ directory.

That isn't going to work because things change in the data directory...

> >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.
>
> I run dirvish <http://www.dirvish.org/> which runs each night starting at
> 00:30 am when there's no activity (by me, at least) on the database.

The database system is potentially doing things though, so this isn't a
backup solution that is reliable.  You really should be using a backup
solution that's been specifically written to work with PostgreSQL.

I wouldn't trust performing a restore from a backup taken like this.
I'd suggest you restore to a new server (or another directory, at
least...) and try starting up PG and then dump out the table and then
check that it's valid.

And then switch to a backup system that actually works with PG.

Thanks,

Stephen

Attachment

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Table update: restore or replace? [RESOLVED]
Next
From: AYahorau@ibagroup.eu
Date:
Subject: Re: terminating walsender process due to replication timeout