Home » Infrastructure » Unix » HotBackup Script
HotBackup Script [message #233919] Sat, 28 April 2007 04:25 Go to next message
Messages: 41
Registered: August 2006
Iam writing a solaris script to perform the hotbackup.This script will behave like this:

1.It will create a appropriate directory in the name of the current hotbackup date.
i.e. if the hotbackup is happening tonight at 10:30pm,the the directory name will be, "28-04-07+10:30".

2.Inside this directory all the files will be copied.

3.After three daily backup and after fourth day backup the script has to delete the older one directory automatically and have to keep the other three directories present.
i.e: If the first hot backup starts on Monday,the folder name will be, "30-04-07+10:30" , the second backup will be
"01-05-2007+10:30",third will be "02-04-2005+10:30" and after the creation of the fourth day backup "03-05-2007+ 10:30",the script have to automatically delete the old one that is "30-04-07+10:30" backup.

This is the concept of the script.

I have achieved the 1st and 2nd step as well,but idont know how to proceed with the 3rd step.
Since, iam not good in sripting, Can anyone help me by providing the solaris script.

OS: Solaris 9 (bash-3.00$ shell),DB:


Re: HotBackup Script [message #235048 is a reply to message #233919] Thu, 03 May 2007 18:17 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You are in
You are supposed to use RMAN and let it take care of backupset retention and expiration.
If you still want to use your old backupsystem,
all you need is a one-liner unix command to delete aged files.
Please search the forum
Here is a nice one as an example.
Previous Topic: Problem related to File handling in Perl
Next Topic: Natural/Adabas from mainframe to unix
Goto Forum:

Current Time: Fri May 24 20:55:01 CDT 2024