X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 099429FAE4E for ; Thu, 13 Jul 2006 08:28:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 72975-02 for ; Thu, 13 Jul 2006 08:28:43 -0300 (ADT) X-Greylist: delayed 23:56:56.90407 by SQLgrey- Received: from mail.cresoltec.com.br (unknown [200.103.143.8]) by postgresql.org (Postfix) with SMTP id 0D83D9FAD5A for ; Thu, 13 Jul 2006 08:28:43 -0300 (ADT) Received: (qmail 701 invoked from network); 11 Jul 2006 12:55:59 -0000 Received: from unknown (HELO ?10.90.2.162?) (10.90.2.162) by mail.cresoltec.com.br with SMTP; 11 Jul 2006 12:55:59 -0000 Message-ID: <44B39FD6.7080800@cresoltec.com.br> Date: Tue, 11 Jul 2006 09:55:50 -0300 From: Alexander Burbello User-Agent: Mozilla Thunderbird 1.0.2 (X11/20060423) X-Accept-Language: pt-br, pt MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Restore database Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/130 X-Sequence-Number: 22376 I need to test and create a procedure to restore databases. I followed the steps based on the site, but I couldn't finish succesfully. I did: 1. Put the database on Backup Mode and copy datafiles. /pg/bin/psql cresoldev -c "SELECT pg_start_backup('/pg/backup/');" tar -cvf /pg/backup/bk_base.tar /pg/data/base/* /pg/bin/psql cresoldev -c "SELECT pg_stop_backup();" File .conf: archive_command = 'cp -i %p /pg/backup/xlog/%f