From: | Jerry Sievers <gsievers19(at)comcast(dot)net> |
---|---|
To: | girish R G peetle <giri(dot)anamika0(at)gmail(dot)com> |
Cc: | Kevin Grittner <kgrittn(at)ymail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL File System Based Backup Restartability |
Date: | 2015-02-17 20:46:25 |
Message-ID: | 86vbj04672.fsf@jerry.enova.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
girish R G peetle <giri(dot)anamika0(at)gmail(dot)com> writes:
> Thanks Kevin.
>
> "Be careful that when you resume after such an interruption you do
> not skip any files and that you complete or re-copy any files that
> were partially copied before the problems."
>
> Here you mean, we should not skip any files that was already backed up before interruption ?
> Â I will have to backup entire content under DATA directory again ?
False.
Any file already copied and known copied thoroughly should not require
copying again.
The file under copy when the network drop occurred needs copying again
and/or syncing if your copy program knows how to do that without moving
all bits... and of course all missing files need copying also.
HTH
> Thanks
> Girish
>
> On Tue, Feb 17, 2015 at 10:04 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>
> girish R G peetle <giri(dot)anamika0(at)gmail(dot)com> wrote:
>
> > 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 ?
>
> As long as you follow all the rules for what files to copy (and not
> copy), you should have a good backup. Some things to be careful
> about that I've seen people get wrong with some frequency:
>
> - Be sure to exclude all files in and under the pg_xlog directory.
> Â The backup should contain the directory itself, and it is best to
> Â include its subdirectory, but copying the files can cause
> Â corruption.
> - Exclude the postmaster.pid file.
> - Be sure *not* to exclude the backup_label file. Without this
> Â file, restoring from the backup may or may not have corruption,
> Â which may or may not be initially apparent.
>
> Be careful that when you resume after such an interruption you do
> not skip any files and that you complete or re-copy any files that
> were partially copied before the problems.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800
From | Date | Subject | |
---|---|---|---|
Next Message | shyamkant.dhamke | 2015-02-18 06:10:06 | High availability with Postgres |
Previous Message | girish R G peetle | 2015-02-17 17:00:36 | Re: PostgreSQL File System Based Backup Restartability |