Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CMS Backup - backup.success (Linux)

Status
Not open for further replies.

oclaudiox

IS-IT--Management
Jun 18, 2006
52
BR
Hi Guys !!!
Does anybody knows how the /cms/maint/backup/backup.success is update ?

When I check the CMS data daily backup, the logs entry shows that backup is perfect, as follows:

[tt]tail /cms/maint/backup/back.log

End date: 43084(12/16/2017)
status: Backing up Historical data: wvector
(ACD = 1)
status: Updating backup history ...
state: 1
error:
status: Last backup finished 12/19/2017 01:35:38.
state: 0
/cms/install/bin/compress_backup successfully finished: Tue Dec 19 01:11:55 BRST 2017[/tt]
=======================

But, the /cms/maint/backup/backup.success keeps on the same date.

[tt]ls -l
total 408
-rw-rw-r--. 1 root cms 30598 Dec 19 01:11 back.log
-rw-rw-r--. 1 root cms 100305 Dec 18 01:06 back.log.01
-rw-rw-r--. 1 root cms 100278 Dec 12 01:06 back.log.02
-rw-rw-r--. 1 root cms 100294 Dec 6 01:06 back.log.03
-rw-rw-rw-. 1 root cms 2 Dec 19 01:11 backup_mt.err
-rw-rw-rw-. 1 root cms 40361 Dec 19 01:11 backup_mt.out
-rw-rw-rw-. 1 root cms 4247 Dec 18 17:39 backup_mt.out.01
-rw-rw-r--. 1 root cms 0 Oct 19 14:43 backup.success
-rw-r--r--. 1 root root 2 Oct 31 01:54 threads_num
================================================================[/tt]

The cms group was setup by me.
Before was root root, but the scenario was the same with no updating for backup.success.

Does anybody can help me ?


oClaudioX
 
Mine does the same. Ask Avaya maybe? Best guess is that is a 0 byte file and is trying to tell you that life is good since Oct 19. If your backup failed today, it might be Dec 19 backup.fail and if it works on the 20th, then you'll have a backup.success with that date until it fails again.

I suppose its more informative to let you know your backups have been successful since X.

The script probably says "on fail, rm -rf backup.success, touch backup.fail" and the inverse when it works so it creates the backup.success if it doesn't exist already, but does pretty much nothing if it already exists. Just a guess.
 
Friend "kyle555", MANY THANKS for now !
About " Ask Avaya maybe?", at least here, on Brazil, they are waiting for our replies ...lol.
I'm looking for the right backup script to check how it works and under what condition it uses the "touch $LOGSUCCESS" to update the "backup.sucess" file.

Lets waiting to see if somebory know more about CMS backup process and can shere it with us.

Thanks in advance, to all !

Claudio.

oClaudioX
 
grep r is your friend.
Code:
[root@cms backup]# grep -r "backup.success" /cms
/cms/toolsbin/db_util:if [ ! -f /cms/maint/backup/backup.success ]; then
/cms/toolsbin/db_util:    MAINTBACK="`find /cms/maint/backup/backup.success -ctime -1 -print|/cms/toolsbin/db_util:    MAINTDATE="`ls -l /cms/maint/backup/backup.success|/cms/toolsbin/db_util:if [ ! -f /cms/install/logdir/backup.success ]; then
/cms/toolsbin/db_util:    CMSADMBACK="`find /cms/install/logdir/backup.success -ctime -31 -print|/cms/toolsbin/db_util:    CMSADMDATE="`ls -l /cms/install/logdir/backup.success|/cms/install/bin/backup:# backup.success is used during cms logon to determine date of last backup
/cms/install/bin/backup:LOGSUCCESS=${CMSBASE}/install/logdir/backup.success export LOGSUCCESS
/cms/install/bin/db_backup:# backup.success is used during cms logon to determine date of last backup
/cms/install/bin/db_backup:export LOGSUCCESS=/cms/maint/backup/backup.success
/cms/maint/backup/back.log.03:/cms/install/bin/compress_backup successfully finished:
 
Mate, thanks again !
I did it before the post, so I got the "LOGSUCCESS" and see that, at final of backup scripts there is a "touch $LOGSUCCESS" command, where LOGSUCCESS="/cms/maint/backup/backup.success".

There is no "IF" conditions to run it.

My results ([highlight #EF2929]about grep command[/highlight]) are a little bit different.

I would like to know the right script that is trigged when we access cms menu, Maintenance>, Back Up Data, to check if there is any condition relationship to "touch $LOGSUCCESS".

Do you know that ?

oClaudioX
 
I'd say what you do in the menu triggers the scripts above. If they executed successfully, they do their thing.

Though I see that part where "# backup.success is used during cms logon to determine date of last backup" is used to probably notify you that a adm backup hasn't been done in >30 days, you'd think the natural thing to do would be have a timestamp of last modified = today if today's backup was good.

But here's a thought:

Maybe the old unix wizards once upon a time decided to us accessed time as the marker but created time as "backups have been successful since..."
Get two data points for the price of one if you only read or access backup.success when backups were successful and only delete it when backup=fail :)

Code:
[root@cms backup]# ls -l --time=atime
total 420
-rw-rw-r--. 1 root cms   93001 Dec 20 11:45 back.log
-rw-rw-r--. 1 root cms  100308 Dec 20 11:45 back.log.01
-rw-rw-r--. 1 root cms  100322 Dec 20 11:45 back.log.02
-rw-rw-r--. 1 root cms  100328 Dec 20 11:45 back.log.03
-rw-rw-rw-. 1 root cms       4 Dec 20 11:45 backup_mt.err
-rw-rw-rw-. 1 root cms     881 Dec 20 11:45 backup_mt.out.01
-rw-r--r--. 1 root cms       0 Dec 20 11:44 backup.success
-rw-r--r--. 1 root root      2 Dec 20 11:45 threads_num
 
Good Morning !!!

Kyle555, THANKS AGAIN !
Sorry for the delay. I was off for the last days ...

About UNIX, EXCELLENT. I like it a lot and it is always good to know more about that.
I did everything that you have talked at last days.

Now I'm looking for more information about the CMS Backup's process.
I guess there is no problem on CMS backup.

I guess the full data and system backup are the guys that updte the "backup.sucess" file.[thumbsup2]
Just a guess as well ...lol.

Mate, that's it.
Your help was very useful about unix SO !

Thanks !!!!

oClaudioX
 
Hey, happy to help. It's all guesswork on my end. I did learn something new though. So I got that going for me, which is nice.
ls -l = last time written
ls -l --time=atime = last time accessed

You'd have to do some reverse engineering on their backup scripts to figure out exactly how when and where things are happening. I'm not much of a scripter, and unless you are, then for your own sanity I wouldn't recommend it. CMS used to run on Sparc/Solaris from the days when the only possible computer that could run a database handling tens of thousands of call records per hour was a SparcStation. That means you need to be pretty fluent in ksh.

If you're just looking for some programmatic way to make sure your backups were successful, I guess "if $DATE in "ls -l --time-atime" = $TODAY" then set $CLAUDIO=HAPPY.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top