Make basebackup use low level API and rsync

Started by wdalmost 12 years ago3 messagesgeneral
Jump to latest
#1wd
wd@wdicc.com

hi,

I'v try to make a base backup use pg_start_backup, pg_stop_backup and
rsync, but failed.

After run select pg_start_backup('label') on db server, I run rsync on
backup server, and got some errors like 'file has vanished: xxxx', think
this should be ok since it's documented in the manual. Then run select
pg_stop_backup() to end the backup.

But when I try to use this backup to restore to a specific time on backup
server, got errors bellow:

[ 2014-04-11 20:50:47.610 CST]LOG: restored log file
"00000001000005FF000000F8" from archive
[ 2014-04-11 20:50:56.698 CST]LOG: restored log file
"00000001000005FF000000F9" from archive
[ 2014-04-11 20:51:05.552 CST]LOG: restored log file
"00000001000005FF000000FA" from archive
[ 2014-04-11 20:51:16.171 CST]LOG: restored log file
"00000001000005FF000000FB" from archive
[ 2014-04-11 20:51:20.785 CST]WARNING: specified item offset is too
large
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.785 CST]PANIC: btree_insert_redo: failed to add
item
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.903 CST]LOG: startup process (PID 4758) was
terminated by signal 6: Aborted
[ 2014-04-11 20:51:20.903 CST]LOG: terminating any other active server
processes

We do this base backup everyday, and the error occur sometimes, not always
happen. I think it's must something wrong in our operations, anyone know
why this happen? May be we should not use rsync or there is something
impotent we missed ?

#2Michael Paquier
michael@paquier.xyz
In reply to: wd (#1)
Re: Make basebackup use low level API and rsync

On Tue, Apr 22, 2014 at 1:28 PM, wd <wd@wdicc.com> wrote:

I'v try to make a base backup use pg_start_backup, pg_stop_backup and
rsync, but failed.

After run select pg_start_backup('label') on db server, I run rsync on
backup server, and got some errors like 'file has vanished: xxxx', think
this should be ok since it's documented in the manual. Then run select
pg_stop_backup() to end the backup.

But when I try to use this backup to restore to a specific time on backup
server, got errors bellow:

[ 2014-04-11 20:50:47.610 CST]LOG: restored log file
"00000001000005FF000000F8" from archive
[ 2014-04-11 20:50:56.698 CST]LOG: restored log file
"00000001000005FF000000F9" from archive
[ 2014-04-11 20:51:05.552 CST]LOG: restored log file
"00000001000005FF000000FA" from archive
[ 2014-04-11 20:51:16.171 CST]LOG: restored log file
"00000001000005FF000000FB" from archive
[ 2014-04-11 20:51:20.785 CST]WARNING: specified item offset is too
large
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.785 CST]PANIC: btree_insert_redo: failed to add
item
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.903 CST]LOG: startup process (PID 4758) was
terminated by signal 6: Aborted
[ 2014-04-11 20:51:20.903 CST]LOG: terminating any other active server
processes

We do this base backup everyday, and the error occur sometimes, not always
happen. I think it's must something wrong in our operations, anyone know
why this happen? May be we should not use rsync or there is something
impotent we missed ?

What is the version used? Recovery is not able to handle properly the redo
for an XLOG record related to btree.
--
Michael

#3wd
wd@wdicc.com
In reply to: Michael Paquier (#2)
Re: Make basebackup use low level API and rsync

PostgreSQL 9.2.4

On Tue, Apr 22, 2014 at 1:58 PM, Michael Paquier
<michael.paquier@gmail.com>wrote:

Show quoted text

On Tue, Apr 22, 2014 at 1:28 PM, wd <wd@wdicc.com> wrote:

I'v try to make a base backup use pg_start_backup, pg_stop_backup and
rsync, but failed.

After run select pg_start_backup('label') on db server, I run rsync on
backup server, and got some errors like 'file has vanished: xxxx', think
this should be ok since it's documented in the manual. Then run select
pg_stop_backup() to end the backup.

But when I try to use this backup to restore to a specific time on backup
server, got errors bellow:

[ 2014-04-11 20:50:47.610 CST]LOG: restored log file
"00000001000005FF000000F8" from archive
[ 2014-04-11 20:50:56.698 CST]LOG: restored log file
"00000001000005FF000000F9" from archive
[ 2014-04-11 20:51:05.552 CST]LOG: restored log file
"00000001000005FF000000FA" from archive
[ 2014-04-11 20:51:16.171 CST]LOG: restored log file
"00000001000005FF000000FB" from archive
[ 2014-04-11 20:51:20.785 CST]WARNING: specified item offset is too
large
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.785 CST]PANIC: btree_insert_redo: failed to add
item
[ 2014-04-11 20:51:20.785 CST]CONTEXT: xlog redo insert: rel
1663/1/12633; tid 1/15
[ 2014-04-11 20:51:20.903 CST]LOG: startup process (PID 4758) was
terminated by signal 6: Aborted
[ 2014-04-11 20:51:20.903 CST]LOG: terminating any other active
server processes

We do this base backup everyday, and the error occur sometimes, not
always happen. I think it's must something wrong in our operations, anyone
know why this happen? May be we should not use rsync or there is something
impotent we missed ?

What is the version used? Recovery is not able to handle properly the redo
for an XLOG record related to btree.
--
Michael