Обсуждение: Help with data recovery...

Поиск
Список
Период
Сортировка

Help with data recovery...

От
"Rajesh Kumar Mallah."
Дата:
Hi ,

my postmaster is refusing to startup. and my last backup is 18 hrs old.
restoring data for that backup is the last option i have.

I have already tried pg_resetxlog -f $PGDATA , but that sets the
database to a state that is 2 days old.

will anyone please help me with my best bet in recovering data
for $PGDATA

 i made a copy of it before running pg_resetxlog.

DEBUG:  database system was interrupted being in recovery at 2002-05-16 21:34:20 IST
        This probably means that some data blocks are corrupted
        and you will have to use the last backup for recovery.
DEBUG:  checkpoint record is at 3/FACBFA78
DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown FALSE
DEBUG:  next transaction id: 6174305; next oid: 30144904
DEBUG:  database system was not properly shut down; automatic recovery in progress
DEBUG:  redo starts at 3/FACBFAB8



--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



Help with data recovery... (pg_controldata output)

От
"Rajesh Kumar Mallah."
Дата:
output of pg_controldata was:


bash-2.03$ ../bin/pg_controldata
pg_control version number:            71
Catalog version number:               200201121
Database state:                       IN_RECOVERY
pg_control last modified:             Thu May 16 21:59:45 2002
Current log file id:                  4
Next log file segment:                164
Latest checkpoint location:           3/FACBFA78
Prior checkpoint location:            3/FABD4720
Latest checkpoint's REDO location:    3/FACBFA78
Latest checkpoint's UNDO location:    0/0
Latest checkpoint's StartUpID:        7
Latest checkpoint's NextXID:          6174305
Latest checkpoint's NextOID:          30144904
Time of latest checkpoint:            Tue May 14 09:22:12 2002
Database block size:                  8192
Blocks per segment of large relation: 131072
LC_COLLATE:                           C
LC_CTYPE:                             C
bash-2.03$

postmaster messages:
DEBUG:  database system was interrupted being in recovery at 2002-05-16 21:34:20 IST
        This probably means that some data blocks are corrupted
        and you will have to use the last backup for recovery.
DEBUG:  checkpoint record is at 3/FACBFA78
DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown FALSE
DEBUG:  next transaction id: 6174305; next oid: 30144904
DEBUG:  database system was not properly shut down; automatic recovery in progress
DEBUG:  redo starts at 3/FACBFAB8






On Thursday 16 May 2002 09:40 pm, Rajesh Kumar Mallah. wrote:
> Hi ,
>
> my postmaster is refusing to startup. and my last backup is 18 hrs old.
> restoring data for that backup is the last option i have.
>
> I have already tried pg_resetxlog -f $PGDATA , but that sets the
> database to a state that is 2 days old.
>
> will anyone please help me with my best bet in recovering data
> for $PGDATA
>
>  i made a copy of it before running pg_resetxlog.
>
> DEBUG:  database system was interrupted being in recovery at 2002-05-16
> 21:34:20 IST This probably means that some data blocks are corrupted
>         and you will have to use the last backup for recovery.
> DEBUG:  checkpoint record is at 3/FACBFA78
> DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown FALSE
> DEBUG:  next transaction id: 6174305; next oid: 30144904
> DEBUG:  database system was not properly shut down; automatic recovery in
> progress DEBUG:  redo starts at 3/FACBFAB8

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



Re: Help with data recovery...

От
Jeremy Buchmann
Дата:
Rajesh Kumar Mallah. wrote:
> Hi ,
>
> my postmaster is refusing to startup. and my last backup is 18 hrs old.
> restoring data for that backup is the last option i have.
>
> I have already tried pg_resetxlog -f $PGDATA , but that sets the
> database to a state that is 2 days old.
>
> will anyone please help me with my best bet in recovering data
> for $PGDATA
>
>  i made a copy of it before running pg_resetxlog.
>
> DEBUG:  database system was interrupted being in recovery at 2002-05-16 21:34:20 IST
>         This probably means that some data blocks are corrupted
>         and you will have to use the last backup for recovery.
> DEBUG:  checkpoint record is at 3/FACBFA78
> DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown FALSE
> DEBUG:  next transaction id: 6174305; next oid: 30144904
> DEBUG:  database system was not properly shut down; automatic recovery in progress
> DEBUG:  redo starts at 3/FACBFAB8

If your hardware is going bad, there's probably not much Pg can do.  18
hours isn't that long ago...if that's not recent enough, you should look
into doing more frequent backups.

--Jeremy



Re: Data has got Successfully Recovered !

От
"Rajesh Kumar Mallah."
Дата:
Thanks to postgresql ,

My data has really got recovered by itself
after a 2 hrs of recovery process by postgresql only.
it was unbeleivable. :-)


====================================================================
bash-2.03$ /usr/local/pgsql/bin/postmaster -d 5   -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster: PostmasterMain: initial environ dump:
-----------------------------------------
        PWD=/usr/local/pgsql/data
        HOSTNAME=linux10320
        LESSOPEN=|/usr/bin/lesspipe.sh %s
        USER=postgres

LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
        MACHTYPE=i386-redhat-linux-gnu
        MAIL=/var/spool/mail/postgres
        INPUTRC=/etc/inputrc
        LANG=en_US
        DISPLAY=linux10320:11.0
        LOGNAME=postgres
        SHLVL=1
        SHELL=/bin/bash
        HOSTTYPE=i386
        OSTYPE=linux-gnu
        HISTSIZE=1000
        TERM=xterm
        HOME=/usr/local/pgsql/data
        PGDATA=/usr/local/pgsql/data
        PATH=/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/pgsql/bin
        _=/usr/local/pgsql/bin/postmaster
-----------------------------------------
FindExec: found "/usr/local/pgsql/bin/postgres" using argv[0]
invoking IpcMemoryCreate(size=136871936)
FindExec: found "/usr/local/pgsql/bin/postmaster" using argv[0]
DEBUG:  database system was interrupted being in recovery at 2002-05-16 21:34:20 IST
        This probably means that some data blocks are corrupted
        and you will have to use the last backup for recovery.
DEBUG:  checkpoint record is at 3/FACBFA78
DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown FALSE
DEBUG:  next transaction id: 6174305; next oid: 30144904
DEBUG:  database system was not properly shut down; automatic recovery in progress
DEBUG:  redo starts at 3/FACBFAB8

<GAP of 2 hrs here >



DEBUG:  ReadRecord: record with zero length at 4/A3CA724C
DEBUG:  redo done at 4/A3CA7228
DEBUG:  database system is ready

=====================================================




On Friday 17 May 2002 04:35 am, Jeremy Buchmann wrote:
> Rajesh Kumar Mallah. wrote:
> > Hi ,
> >
> > my postmaster is refusing to startup. and my last backup is 18 hrs old.
> > restoring data for that backup is the last option i have.
> >
> > I have already tried pg_resetxlog -f $PGDATA , but that sets the
> > database to a state that is 2 days old.
> >
> > will anyone please help me with my best bet in recovering data
> > for $PGDATA
> >
> >  i made a copy of it before running pg_resetxlog.
> >
> > DEBUG:  database system was interrupted being in recovery at 2002-05-16
> > 21:34:20 IST This probably means that some data blocks are corrupted
> >         and you will have to use the last backup for recovery.
> > DEBUG:  checkpoint record is at 3/FACBFA78
> > DEBUG:  redo record is at 3/FACBFA78; undo record is at 0/0; shutdown
> > FALSE DEBUG:  next transaction id: 6174305; next oid: 30144904
> > DEBUG:  database system was not properly shut down; automatic recovery in
> > progress DEBUG:  redo starts at 3/FACBFAB8
>
> If your hardware is going bad, there's probably not much Pg can do.  18
> hours isn't that long ago...if that's not recent enough, you should look
> into doing more frequent backups.
>
> --Jeremy
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.