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.scan...@gmail.com <mailto:mg.scan...@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

Reply via email to