Using pg_start_backup() and pg_stop_backup() - using 9.1.2.2

From: Khangelani Gama <kgama(at)argility(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Using pg_start_backup() and pg_stop_backup() - using 9.1.2.2
Date: 2014-06-14 13:44:38
Message-ID: efc434859e7f7da4ed06f3e1bdf6c529@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all

Please help me here.

I am doing the following between master and the backup server using
archive_command,

I am using O/S - Red Hat Enterprise Linux Server release 5.3 (Tikanga)

On backup or secondary server I did the following:

1. Stopped postgres in backup server

2. Removed all walfiles from /walfiles directory

3. Removed all files from pg_xlog/

Went to master/source server:

1. Issue pg_start_backup('label')

2. Performed rsync of cluster directory (nohup rsync -avz
/pgsql2/data backupserver:/pgsql2/ > /tmp/rsynccopy.out 2>
/tmp/rsynccopy.err & )

3. Step 2 takes a long time because the database is huge. But during
the rsync process many files are getting copied to the backup server
landing in /pgsql2/walfiles/ directory which I cleaned up before starting
backup in the master server.

4. Once step 3, rsync is done I will run Issue pg_stop_backup().

Then connect to secondary server and remove recovery.done and create
recovery.conf file, and remove pid file which got copied from master
server.

Question I have is After doing step 4, what do I with the files that have
been copying as I mentioned in step 3 above or that have been copying
during the rsync command. Do I have to copy any walfiles manually after
doing step 4 above in the master server?

CONFIDENTIALITY NOTICE
The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential
information of Argility (Proprietary) Limited and/or its subsidiaries. Any review, use or dissemination thereof by anyone
other than the intended addressee is prohibited.If you are not the intended addressee please notify the writer immediately
and destroy the e-mail. Argility (Proprietary) Limited and its subsidiaries distance themselves from and accept no liability
for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Damir Dezeljin 2014-06-14 15:52:43 Designing a DB for storing biological data
Previous Message Steve Kehlet 2014-06-14 01:53:24 Re: Spurious Stalls