Re: Are file system level differential/incremental backups possible? - Mailing list pgsql-general

From Bob Hatfield
Subject Re: Are file system level differential/incremental backups possible?
Date
Msg-id CAKikJcKKXNvbowWb57auc-BnaSQGOKs2e6RDCHOdJtYw6mVnig@mail.gmail.com
Whole thread Raw
In response to Re: Are file system level differential/incremental backups possible?  (Craig Ringer <ringerc@ringerc.id.au>)
Responses Re: Are file system level differential/incremental backups possible?  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
>> Is it possible to do a full file system level backup of the data
>> directory, say once a week, and differentials or incrementals daily?
>
> I'd love to be able to do this, but you can't do it usefully at a
> file-system level. There's too much churn in the data files for even a
> binary diff to be much use - and even if it were, the performance of it
> would be miserable.

Actually, for us, a full backup is currently about 950GB which takes
about 24 hours and a diff several days later is only 150GB and takes
two hours.  (It takes significantly less time not only becuase it's
less data but also because the diff job doesn't have to compete with
other backup jobs (since it's faster due to less data).)

I currently stop pg, robocopy (rsync) the changes to our DRS server,
restart pg -- then backup the data on the DRS server later.  This
allows us to have our database back up within 30 minutes.

I've tested the database after doing a restore: full + diff and it
seems fine (both viewing with the application as well as running a
reindex on the entire db).  I think we'll stick with this process with
the understanding that if a disaster struck, and we needed to do a
full + diff restore, that we may have a few files that are there that
that aren't needed.

pgsql-general by date:

Previous
From: Martín Marqués
Date:
Subject: inserting bytea using PHPs pg_escape_bytea()
Next
From: Bobby Dewitt
Date:
Subject: Logging ALL output from psql