Operating System - Tru64 Unix
1748180 Members
4121 Online
108759 Solutions
New Discussion юеВ

Re: Unable to verify data on DDS-3

 
SOLVED
Go to solution
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Hi Peter. What I had hoped was that CRON scheduled backup (daily Mon-Thurs / Weekly Fri) that backed up all data + system files to tape so that in the event of a failure I could recover the server from tape media. The script should also kill users at backup commencement to ensure backup does not fail then send email notification upon completion.

As I said previously, running
tar tvf /dev/rmt0h daily looked fine so the script must work?
Regards,
Phil.
Pieter 't Hart
Honored Contributor

Re: Unable to verify data on DDS-3

maybe the backup to tape does not run under account mtms? (maybe root)
if so you're looking at the wrong jobs.

try if you can
"more /var/spool/cron/crontabs/*"

what mail do you get?
(all mail lines also have "#")
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Hi Pieter. I ran: more /var/spool/cron/crontabs it returned

/var/spool/cron/crontabs is a directory

I had a look inside and there are a number of files, what should I be looking for?

Regards email I receive mail with attached file: cron.wri from account mtmsadm

Not sure how mail works on unix (i.e. how it gets pushed out to my exchange server)?

Thanks,
Phil.
Pieter 't Hart
Honored Contributor

Re: Unable to verify data on DDS-3

hi Phil,
you missed the "/*" (asterix, wildcard) at the end of the command.
Each user has it's own file in this directory for jobs to be run by cron.
so with the "/*" you get a view of the cron entries of all the users (if you may view those files).
especially look at /var/spool/cron/crontabs/root (user root)for entries wich could be backup-actions.

another option is to wait until the tape-drive is used by some process and do a "ps -ef |grep rmt0" to see wich script is running and using the tape unit.

but before going so deep. your first concern is to check if the backup is running correctly now the tape is properly loaded.
locating the right script is interesting but not mandatory at this time.
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Hi Pieter. Added the wild card /*. Nothing running that I have not posted previously. What confuses me is that root CRON runs nightly1.jcl & mtmsadm CRON runs Nightly.jcl / Weekly.jcl which in turn reference AUTOBACKUP & WEEKLYBACKUP.

root - nightly.jcl is mostly commented out (or using a shell):
[quote]
umask 002
# CRONTAB="yes"; export CRONTAB
cd /mtms/tmp
if [ -f sys.profile ]
then
. ../sys.profile
fi
# echo "done /mtms/tmp/sys.profile"
if [ -f $MTMSROOT/mtms/std.profile ]
then
. $MTMSROOT/mtms/std.profile
fi
# echo "done /mtms/std.profile"
#if [ -f $MTMSROOT/mtms/user.profile ]
#then
# . $MTMSROOT/mtms/user.profile
#fi

if [ -f std.profile ]
then
. ./std.profile
fi
# echo "done /mtms/tmp/std.profile"
# if [ -f user.profile ]
# then
# . ./user.profile
# fi
# echo "done /mtms/tmp/user.profile"


#
# Stop the BSCqueu.run routine (to free up RECOVERY), if it is running
#

/mtms/bin/BSCqueue
#
# Restart the BSCqueue if required
#
# cd /mtms
# /mtms/crontab.profile
# su - BSC
# wait 20
# exit 0
[/quote]

I pretty much expect the backup to run (it ran OK Thursday (Nighly.jcl). The backup that seems to fail is Weekly.jcl.
Thanks,
Phil.
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Pieter I have noted the WEEKLYBACKUP backs up using:
tar -cvB -C /mtms . -C /mtmsdb . -C /mtmsdb1 . -C /mtmsdb2/mtmsdb1

The AUTOBACKUP uses:

tar cvB -C /mtmsdb1 . -C /mtmsdb2/mtmsdb1

Whats the difference between -cvB and cvB?
Thanks,
Phil.
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Pieter the backup is scheduled for 1900. I have just run command suggested to see what script was running, it returned;

mtmsadm 6559 6601 0.0 20:05:08 ttyp1 0:00.01 grep rmt0

regards,
Phil.
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Pieter the backup completed as expected. I received email notification as follows:
[quote]
Mon Jul 14 19:50:00 BST 2008 Start of CRON processing
mTMS backup procedure: /mtmsdb/recovery.log renewal
Recovery file /mtmsdb/recovery.log will be moved to /mtmsdb/LOG07141950.LOG

Backup Successful

Previous /mtmsdb/recovery.log now in /mtmsdb/LOG07141950.LOG

New /mtmsdb/recovery.log now created

Backup of Database Complete ..You May Resume Normal MTMS operations now .

Mon Jul 14 21:16:10 BST 2008 End of CRON processing
[/quote]

I ran: tar tvf /dev/rmt0h to verfy data has been written to the tape. The final few entries are below:

[quote]
-rw-rw-r-- 1000/1000 344064 Jul 14 12:05:25 2008 ./DSACCA.idx
-rw-rw-r-- 1000/1000 1316864 Jul 14 12:05:25 2008 ./DSACCA.dat
drwxrwxr-x 1003/1000 0 Sep 25 15:28:59 2007 .
-rwxrw-rw- 1000/1000 2315800576 Jul 14 14:07:47 2008 ./DSCLED.dat
-rwxrw-rw- 1000/1000 697363456 Jul 14 14:07:47 2008 ./DSCLED.idx
[/quote]

As you can see the files have a last modified date = to yesterday July 14.

I will monitor this evening as I only have 1 previous good backup (there may just be an issue with the Weekly?).

Many thanks for keeping pace with this post.
Phil.
Pieter 't Hart
Honored Contributor
Solution

Re: Unable to verify data on DDS-3

Hi Phil,
apearently at 19:07 the process was not yet accessing the tapeunit, so the grep for rmt only returned your own grep-command.
the first line of the mail confirms this:
"Mon Jul 14 19:50:00 BST 2008 Start of CRON processing"
which matches this enry in the crontab of user mtms :
"50 19 * * 1-4 /mtms/bin/Nightly.jcl > /mtms/tmp/cron.out"
wich in turn starts "/mtms/bin/AUTOBACKUP"

as i stated before a "#" normally denotes a comment in shell scripts, but the filenames ending with ".jcl" and other commands within these scripts suggest you are using a script-environment other than sh or ksh wich DOES reads and interprets the lines starting with "#"

in the weekly script all lines adressing mail are "#"-ed, in the autobackup they are not!
so maybe it does run, but doesn't mail!

the difference between -cvB and cvB is "historical". originally "-" was used to specify options on commands.
in later tru64 versions the options can be specified without this character.
see attached note from "man tar".
Philip Horan
Frequent Advisor

Re: Unable to verify data on DDS-3

Thanks Pieter. Although I am unconvinced I have heard the last of this issue I shall award points as they have been well earned!
Many Thanks,
Phil.