Help needed in PITR

From: Andrea <arussos(at)comune(dot)modena(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Help needed in PITR
Date: 2008-04-14 07:34:33
Message-ID: 48030909.3050109@comune.modena.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all, i'll try a second time to post tips on the problem i'm facing....

Fisrt sorry for my impatience; i first try to reed deeply as i can the
docs and then i tryed to setup a test env to run a PITR, but it didn't
work as is expected to.

Now i'm getting confused, so i really need help in trying to understand
what i did wrong, or, more probably, what i didn't understand....
Here's what i did:
1) set up a crontab which copys the last-created WAL file in
/home/postgres/WAL
2) set up a shell-script as a the archive_command: it copyes WAL files
from pg_xlog dir in /home/postgres/WAL
3) set up a shell script for doing the backup. It connects to DB and
then issues "SELECT pg_start_backup('full-bck');" , then it execute "tar
--exclude data/pg_xlog -cvzpf archive.tar.gz data" , and finally "SELECT
pg_stop_backup();".

For testing purposes i use another server in which i installed the same
version of PostgreSQL. In it i deleted the DATA dir (
/var/lib/pgsql/data ); then i unpacked the archive.tar.gz ; i created
the pg_xlog dir and, in it, also the archive_status one.
I setup the recovery.conf whit the recovery_command='cp
/home/postgres/WAL/%f "%p"' . I copied all the WAL files fron the
old-server to the new one in /home/postgres/WAL/.
When i try to start the DB it hangsup saying ( in the logs ):
.....
LOG: database system was interrupted at 2008-04-11 09:03:48 CEST
LOG: starting archive recovery
LOG: restore_command = "cp /home/postgres/WAL/%f %p"
cp: cannot stat `/home/postgres/WAL/00000001.history': No such file or
directory
LOG: restored log file "00000001000000010000006A" from archive
LOG: unexpected pageaddr 1/602B2000 in log file 1, segment 106, offset
2826240
LOG: invalid primary checkpoint record
LOG: restored log file "00000001000000010000006A" from archive
LOG: unexpected pageaddr 1/60280000 in log file 1, segment 106, offset
2621440
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
LOG: startup process (PID 22672) was terminated by signal 6
LOG: aborting startup due to startup process failure
LOG: logger shutting down
.....

Someone can help in understanding where is the problems ???

Thanks in advance,

--Andrea

Browse pgsql-general by date

  From Date Subject
Next Message Chris Velevitch 2008-04-14 07:46:02 how to get pg_restore to continue if an error occurs
Previous Message Stefan Schwarzer 2008-04-14 05:47:21 The default text search configuration will be set to "simple" ?