Re: PostgreSQL File System Based Backup Restartability

From: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL File System Based Backup Restartability
Date: 2015-02-17 15:40:49
Message-ID: CAKKd06406V3GF0y+EDEpvWKbWDpWzy8zzQVo1FYuXJyw-PWu0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

After executing pg_start_backup, we will generate a file 'Backup file'
which will contain list of all the folders n files under DATA directory.

Then we read entry from 'Backup file' sequentially and use copy
command/script to move it to backup media.

When network encounters copy script will fail stating couldn't backup the
file.

Say copy command throws error at 20th file entry. When backup is resumed
copy command resumes from 20th file entry.

Thanks
Girish
On Feb 17, 2015 4:26 PM, "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:

> girish R G peetle wrote:
> > Is PostgreSQL file system based backup restart-ability possible ?
> >
> > Steps
> > - Database size is 1 TB
> > - I'll execute pg_start_backup('label');
> > - I will traverse through the DATA directory to get the list of
> directories and files.
> > - I will start moving the files to backup media. ( over network )
> > - When I'm half way (500GB done), network error happens. So movement of
> files is halted.
> > - Network issue is resolve after 30 minutes (In this time files might
> have got deleted or added with
> > creation/deletion of database/tables )
> > - I'll resume moving the files to backup media from where it had halted.
> > - When movement of files is done, I'll execute pg_stop_backup()
> > - I'll move all the transaction logs that got archived to backup media.
> >
> > Is PostgreSQL server recovery to a consistent state possible with backup
> content obtained from above
> > steps ?
>
> That should work, but I guess it may depend on what the copy program does
> if it encounters the
> network error. Were there any messages?
>
> Yours,
> Laurenz Albe
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2015-02-17 16:34:43 Re: PostgreSQL File System Based Backup Restartability
Previous Message Tom Lane 2015-02-17 15:13:19 Re: Canceling REINDEX safe?