Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9AE3F1337B73 for ; Wed, 29 Sep 2010 05:17:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 38061-06 for ; Wed, 29 Sep 2010 08:16:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id 9CD241337B6E for ; Wed, 29 Sep 2010 05:16:55 -0300 (ADT) Received: by bwz11 with SMTP id 11so346530bwz.19 for ; Wed, 29 Sep 2010 01:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=VcR9nKeIjy4qikEKTGFZyhUDHIZjp8J+cgt2Qk8V5U8=; b=vRMlGnbS/dM7DU6cfNV6CqUTq3r+VzZ6hikZXr5hQ90Yr6XW93JTDfYauUtaPbW7iH 4u7Hn85eqqRBu7faPMRNweq2vavXimZQmVDc+n86Tyv6E7Gvtivffh8NarxB2NQ7L4wM +ApQZohTUV7tcA96o9kuxx9ps4ausQTTfhKRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=csAQdGgJ05kaznSBcKpDFcEIAetGj4p3wI1mAk+fLBzSjXrrBZqZFqwd35tmvFcBYf 1W6TzUMDnm2B1lg5v6/uXcW5kk1KmraZ9/KmrMY3/l7k32r23QbhVSx7fCRDygPlEYOG +/BW67WEULumg4zcqBTaeZWpzlXp7p7Pm/+9c= Received: by 10.204.102.197 with SMTP id h5mr1073463bko.24.1285748214831; Wed, 29 Sep 2010 01:16:54 -0700 (PDT) Received: from [127.0.0.1] (ip-94-42-66-74.ibd.gtsenergis.pl [94.42.66.74]) by mx.google.com with ESMTPS id x19sm6424359bkv.21.2010.09.29.01.16.52 (version=SSLv3 cipher=RC4-MD5); Wed, 29 Sep 2010 01:16:53 -0700 (PDT) Message-ID: <4CA2F5ED.3000209@gmail.com> Date: Wed, 29 Sep 2010 10:16:45 +0200 From: Michal Glowacki User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: Fujii Masao CC: pgsql-admin@postgresql.org Subject: Re: Hot standby server does not start References: <4CA2F025.3010508@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000305080503060404080009" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201009/180 X-Sequence-Number: 35724 This is a multi-part message in MIME format. --------------000305080503060404080009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fujii, I believe I should follow this (from documentation): ************************ The procedure for making a base backup is relatively simple: 1. Ensure that WAL archiving is enabled and working. 2. Connect to the database as a superuser, and issue the command SELECT pg_start_backup('label'); where label is any string you want to use to uniquely identify this backup operation. (One good practice is to use the full path where you intend to put the backup dump file.) |pg_start_backup| creates a /backup label/ file, called backup_label, in the cluster directory with information about your backup. It does not matter which database within the cluster you connect to to issue this command. You can ignore the result returned by the function; but if it reports an error, deal with that before proceeding. 3. Perform the backup, using any convenient file-system-backup tool such as tar or cpio. It is neither necessary nor desirable to stop normal operation of the database while you do this. 4. Again connect to the database as a superuser, and issue the command SELECT pg_stop_backup(); This should return successfully. 5. Once the WAL segment files used during the backup are archived as part of normal database activity, you are done. ********************************** BUT I have some questions: 1. I connect to database using psql and issue command SELECT pg_start_backup('my_backup'); The result (in less than second) is: pg_start_backup ----------------- 4/DA000020 (1 row) Is it correct it goes that fast? 2. Now I proceed to step 3 - perform the backup using file system backup. Could you assist me on this one? I should archive what?The '/data' folder (please note I use Windows)? Should I just compress it into rar file and transfer to standby server and overwrite it's '/data' folder? Regards, Michal > > On Wed, Sep 29, 2010 at 4:52 PM, Michal Glowacki > wrote: > > > I try to do it on two machines, my computer and local server. My > system is Windows 7 64bit, standby is XP professional sp2 64bit. > Both machines run postgres 9.0.0. I tried dump, dump_all, pgadmin > III's backup and restore - nothing works. > > > Instead of pg_dump, you need to take a base backup by using > pg_start_backup > and pg_stop_backup, and load it in the standby. > > Regards, > > -- > Fujii Masao > NIPPON TELEGRAPH AND TELEPHONE CORPORATION > NTT Open Source Software Center --------------000305080503060404080009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Fujii, I believe I should follow this (from documentation):

************************

The procedure for making a base backup is relatively simple:

  1. Ensure that WAL archiving is enabled and working.

  2. Connect to the database as a superuser, and issue the command

    SELECT pg_start_backup('label');

    where label is any string you want to use to uniquely identify this backup operation. (One good practice is to use the full path where you intend to put the backup dump file.) pg_start_backup creates a backup label file, called backup_label, in the cluster directory with information about your backup.

    It does not matter which database within the cluster you connect to to issue this command. You can ignore the result returned by the function; but if it reports an error, deal with that before proceeding.

  3. Perform the backup, using any convenient file-system-backup tool such as tar or cpio. It is neither necessary nor desirable to stop normal operation of the database while you do this.

  4. Again connect to the database as a superuser, and issue the command

    SELECT pg_stop_backup();

    This should return successfully.

  5. Once the WAL segment files used during the backup are archived as part of normal database activity, you are done.


**********************************

BUT I have some questions:

1. I connect to database using psql and issue command SELECT pg_start_backup('my_backup'); The result (in less than second) is:

 pg_start_backup
-----------------
 4/DA000020
(1 row)

Is it correct it goes that fast?

2. Now I proceed to step 3 - perform the backup using file system backup. Could you assist me on this one? I should archive what?The  '/data' folder (please note I use Windows)? Should I just compress it into rar file and transfer to standby server and overwrite it's '/data' folder?

Regards,
Michal


On Wed, Sep 29, 2010 at 4:52 PM, Michal Glowacki <mg.scandic@gmail.com> wrote:

I try to do it on two machines, my computer and local server. My system is Windows 7 64bit, standby is XP professional sp2 64bit. Both machines run postgres 9.0.0. I tried dump, dump_all, pgadmin III's backup and restore - nothing works.

Instead of pg_dump, you need to take a base backup by using pg_start_backup
and pg_stop_backup, and load it in the standby.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

--------------000305080503060404080009--