Please refer to the documentation relating to logging and backup concepts. kind regards Uwe
> -----Original Message----- > From: gwenouman [mailto:[EMAIL PROTECTED] > Sent: Montag, 25. August 2003 12:34 > To: Hahn, Uwe; [EMAIL PROTECTED] > Subject: RE: Restoring logs with SAPDB: strange behaviour > > > The database is in online mode after restoring the > first log. So this is normal that logs no 2 and 3 are > not required? > But why are they created then? > > And what if I do some other manipulations later, that > make a 4th log necessary? Does the DB update log > number 1 si as it knows log number 4 is required? > > --- "Hahn, Uwe" <[EMAIL PROTECTED]> a �crit�: > After > you received the OK is the database kernel in > > online mode ? > > If so the log volume contained all log necessary to > > restart. > > A log backup does not delete the log contents it > > only allows to overwrite > > these parts in the log volume. At restart this > > behaviour is used in the way that you do not need to > > give log backups for log contents which is already > > on the log volume. > > > > If your db is not online you have to send the usual > > files. > > (knldiag, dbm.utl, dbm.prt, dbm.knl, knldiag.err) > > > > kind regards > > Uwe > > > > > -----Original Message----- > > > From: gwenouman [mailto:[EMAIL PROTECTED] > > > Sent: Montag, 25. August 2003 11:22 > > > To: [EMAIL PROTECTED] > > > Subject: Restoring logs with SAPDB: strange > > behaviour > > > > > > > > > I'm trying to restore a SAPDB database using > > automatic > > > logs. > > > > > > For backing up the DB, I use this script: > > > > > > > # $1 : database > > > > # $2 : node > > > > # $3 : user,password (admin) > > > > # $4 : path for log files > > > > # clear actual log state > > > > dbmcli -uUTL -d $1 -n $2 -u $3 util_execute > > clear > > > log > > > > > > > > # define "completeF" as the medium for complete > > data > > > backup > > > > dbmcli -d $1 -n $2 -u $3 medium_put completeF > > > $4/complete FILE DATA 0 > > > 8 YES > > > > > > > > # write complete data backup to file > > > > dbmcli -d $1 -n $2 -u $3 -uUTL -c backup_start > > > completeF RECOVERY > > > > > > > # define "autosave" as the medium for automatic > > logs > > > backup > > > > dbmcli -d $1 -n $2 -u $3 medium_put autosave > > > $4/autolog FILE AUTO 0 8 > > > YES > > > > > > > > # remove old logs > > > > ls $4/autolog.* | grep "autolog[.][0-9]*" | rm > > -f > > > > > > > > # set the log backup as automatic > > > > dbmcli -d $1 -n $2 -u $3 autolog_on > > > > > > > > > It works well. My data backup is created where I > > want > > > it created. > > > > > > Then I do some stuff on the database so as to have > > > several logs created. > > > (I mainly run a script putting several thousands > > of > > > tuples in the db and > > > call load_systab, both operations filling the log > > > segment quite quickly) > > > When I have 2 or 3 logs created, I try to restore > > the > > > whole thing using: > > > > > > > # $1 : database > > > > # $2 : node > > > > # $3 : user,password (admin) > > > > # $4 : path for log files > > > > # database must be in cold state > > > > dbmcli -uUTL -d $1 -n $2 -u $3 db_cold > > > >�������� > > > > # Restore original database > > > > echo "Restoring initial data" > > > > dbmcli -uUTL -d $1 -n $2 -u $3 recover_start > > > completeF > > > > > > > > # Restore successive changes written to logs > > > > echo "Restoring logs" > > > > dbmcli -uUTL -d $1 -n $2 -u $3 recover_start > > > autosave 001 > > > >�������� > > > > # foreach log after the first > > > > for i in `ls $4/ | grep "autolog[.][0-9]*" | > > grep -v > > > autolog.001` > > > > do > > > > dbmcli -uUTL -d $1 -n $2 -u $3 recover_replace > > > autosave $4/autolog > > > `echo $i | cut -c9-11` > > > > done > > > >�������� > > > > #finish recovery phase if last log has no > > successor > > > > dbmcli -uUTL -d $1 -n $2 -u $3 recover_ignore > > > >�������� > > > > # set db in warm state > > > > dbmcli -uUTL -d $1 -n $2 -u $3 db_warm > > > > > > > > > Recovering the data backup works well. > > > > > > But when I recover the first log file, I am > > returned a > > > 0 source code, > > > which means "ok! finished!". I thought it was > > supposed > > > to return a -8020 > > > return code, meaning that successive logs are > > > expected, then wait for a > > > recover_replace. > > > Consequently, my "recover_replaces"s don't do > > > anything. > > > > > > > > > Can someone tell me what's wrong in what I do? > > > > > > > > > Gwen > > > > > > > > > ___________________________________________________________ > > > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite > > et en fran�ais ! > > > Yahoo! Mail : http://fr.mail.yahoo.com > > > _______________________________________________ > > > sapdb.general mailing list > > > [EMAIL PROTECTED] > > > > > > http://listserv.sap.com/mailman/listinfo/sapdb.general > > > > > ___________________________________________________________ > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais ! > Yahoo! Mail : http://fr.mail.yahoo.com > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
