Ignite-UX

How to check make_tape_recovery buckuped files

 
SOLVED
Go to solution
Stefano_10
Advisor

How to check make_tape_recovery buckuped files

Dear all,
i would know how i can verify that on the tape there are all the files that make_tape_recovery should have backed up.
Thank you
Stefano
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: How to check make_tape_recovery buckuped files

Stefano,

Use the mt command to skip the first file: mt -t /dev/rmt/Xmn fsf 1

Then use tar -t to view the contents of the archive.


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: How to check make_tape_recovery buckuped files

There is only One way to be absolutely sure:

Boot a system off the tape and restore it and look at the results.

Beyond that you will have to trust the logs.

It is a good idea to test disaster recovery though so I recommend a test before you are in a panic recovery situation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: How to check make_tape_recovery buckuped files

Insert the tape into the tape drive. Then do:

# mt -f /dev/rmt/?mn rew
# mt -t /dev/rmt/?mn fsf 1
# tar -tvf /dev/rmt/?mn

Replace the ?mn the the appropriate tape drive for your system and be sure to use the no-rewind device name as I do above.
Sanjay_6
Honored Contributor
Solution

Re: How to check make_tape_recovery buckuped files

Tim Adamson_1
Honored Contributor

Re: How to check make_tape_recovery buckuped files

You could do a 2 way check.

Run check_recovery which will compare the current system to the system recovery status file.

And secondly, you can position the tape after the lif volume (mt -t /dev/rmt/0mn fsf 1) and run a "tar tvf /dev/rmt/0mn > /tmp/tape-contents" command and check the output to what is on the system or recorded in the flist file in the recovery directory (/var/opt/ignite/recovery/latest).


Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Patrick Wallek
Honored Contributor

Re: How to check make_tape_recovery buckuped files

Just an FYI -- check_recovery will do you no good if you use make_tape_recovery command to create the tape. The check_recovery command was only useful if you used make_recovery with the -C option. Since make_recovery has been deprecated (ie. obsoleted), check_recovery essentially is too.

check_recovery would NOT check the tape anyway. check_recovery was just designed to tell you if it thought it was time for you to create another make_recovery tape.

I recommend to just forget about check_recovery and use the make_tape_recovery command which has many more options and is much more robust.
Bernhard Mueller
Honored Contributor

Re: How to check make_tape_recovery buckuped files

Stefano,

to verify e.g. automated recovery tape creation it is really best to rely on the log file.

Basically a grep -i -E "unsuccessful|error|fail|abort" /var/opt/ignite/recovery/latest/recovery.log will most likely alert you in case of any problem.

(Warnings can usually be ignored).

The one thing you *might* want to check in addition is the filelist (var/opt/ignite/recovery/latest/flist) which is used to create the archive and possibly if there is a difference between the flist and what a tar tvf of the archive lists.

I have had a single case where a there was a problem with a directory name consisting of a single non-printing character and everything in the flist following this line was *not* contained in the archive. However, in this case the logfile said something like "awk: cannot divide by zero" (but also "... completed successfully" !!)

Regards,
Bernhard
Mario Agustin_1
New Member

Re: How to check make_tape_recovery buckuped files

Try this:

mt -t /dev/rmt/0mn fsf 1
tar -tvf /dev/rmt/0mn


Steven E. Protter
Exalted Contributor

Re: How to check make_tape_recovery buckuped files

I've bookmarked the post because I like it.

The bottom line though is that if you are going to be sure about your make_tape_recovery, you are going to have to boot off that tape and restore a system and see if it works.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com