Re: Hot standby server does not start

From: Michal Glowacki <mg(dot)scandic(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Hot standby server does not start
Date: 2010-10-01 11:07:35
Message-ID: 4CA5C0F7.8040407@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

hi,

it's fine now - the problem was WinRAR which reported that he can't
access some files and I ignored that - big mistake :)

Thanks for help - working fine now.

Michal
> Le 29/09/2010 10:16, Michal Glowacki a écrit :
>> 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?
>>
> Yes.
>
>> 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?
>>
> Using rar on the data folder should work if you don't have tablespaces.
> If you have some, add them to your data rar archive.
>
> And instead of overwriting the data folder on the slave, wipe out your
> old data folder and recreate it by restoring your rar archive.
>
> BTW, pgAdmin backup and restore facilities use pg_dump/pg_restore. So
> it's not really surprising that you get the same results :)
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-10-01 13:13:57 Re: could not connect to server: Connection refused (0x0000274D/10061)
Previous Message Anuj Pankaj 2010-10-01 10:45:16 Re: could not connect to server: Connection refused (0x0000274D/10061)