Search Postgresql Archives

Problems in PITR backup&recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux