Re: Differential Backups

From: hubert depesz lubaczewski <depesz(at)depesz(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Differential Backups
Date: 2001-10-31 05:51:25
Message-ID: 20011031065125.7a9c7929.depesz@depesz.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 30 Oct 2001 11:05:48 -0800
"Jeff Lu" <jklcom(at)mindspring(dot)com> wrote:

> Can you show me an example on doing a backup using xdelta?

sure.
what i will show assumes that usually you want newest backup to be available
fastest. older backups can take some time to generate.

first make your standard pg_dump to some file. let's call it dump.sql
$ pg_dump -d dump.sql .........
o.k.
now next day (and every following day too) you do:
$ pg_dump -d new.dump ........
$ xdelta delta new.dump dump.sql patch_file_name
$ mv -f new.dump dump.sql

now in dump.sql you always have the newest dump file, while patch file
contains information how to get older patch from newer.
how to patch?

$ xdelta patch patch_file_name dump.sql old.dump.sql

all you have to do is to store these patchfiles forever, or just ocassionally
(once in a month) make full backup instead of differential.

depesz

--
hubert depesz lubaczewski http://www.depesz.pl/
------------------------------------------------------------------------
... vows are spoken to be broken ... [enjoy the silence]
... words are meaningless and forgettable ... [depeche mode]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tony 2001-10-31 13:05:16 function gurus...
Previous Message Bruce Momjian 2001-10-31 02:18:42 Re: Database corruption?