Unix Technical Forum

Problems in PITR backup&recovery

This is a discussion on Problems in PITR backup&recovery within the Pgsql General forums, part of the PostgreSQL category; --> Hi all, i'm trying to setup PITR on my postgresql ( i run version 1.8.11 ); Following the docs ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 09:33 PM
Andrea
 
Posts: n/a
Default Problems in PITR backup&recovery

Hi all, i'm trying to setup PITR on my postgresql ( i run version 1.8.11 );
Following the docs and tips from the list this is what i made:

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com