Operating System - HP-UX
1834817 Members
2684 Online
110070 Solutions
New Discussion

Re: script for daily backup

 
GSB_3
Frequent Advisor

script for daily backup

Hi

I have two HP-UX boxes dbaux1 and dbaux2. /Clearcase is NFS mounted on dbaux2 from dbaux1.I need one script to automate daily tar backup process. Following are the steps which I perform manually

- Login to dbaux1 as comvobad
- Execute ./lockvob.sh
- change directory to /Clearcare/backup
- tar the contents by executing "tar -cf ccbkp.tar -C ../store/ combo/"
- change dirctory back to home directory
- Execute ./unlockvob.sh

- Login to dbaux2
- Change directory to /data1/ccbkp
- move ccbkp.tar ftom /ClearCase/backup to current directory

Please tell me how can automate this process for daily backup.

Thanks in advance.
GSB

8 REPLIES 8
spex
Honored Contributor

Re: script for daily backup

Hello,

Write a shell script using the steps you provided as an outline.

http://docs.hp.com/en/B2355-90046/

If you give a man a fish...

PCS
Luk Vandenbussche
Honored Contributor

Re: script for daily backup

Crontab is the job sheduler

http://docs.hp.com/en/B2355-60127/crontab.1.html

PS : points are always appreciated
GSB_3
Frequent Advisor

Re: script for daily backup

Hi,

Can anyone send me the script for the same?

GSB
spex
Honored Contributor

Re: script for daily backup

Any sysadmin worth his salt should be able to handle such a basic shell script. Do yourself a favor: read the manual and write it yourself. You'll learn skills essential to your chosen field.
GSB_3
Frequent Advisor

Re: script for daily backup

I am not a sys admin. I work on microsoft tech...

Can anyone help

Thanks
Luk Vandenbussche
Honored Contributor

Re: script for daily backup

Do you know how to edit a file under unix / linux. Do you know vi?

Create a script which contains

$HOME/lockvob.sh
cd /Clearcare/backup
tar -cf ccbkp.tar -C ../store/ combo/
cd $HOME
$HOME/unlockvob.sh

Test this script before you put in the cron
GSB_3
Frequent Advisor

Re: script for daily backup

Thanks Luk ... u got the points.....:-)
GSB_3
Frequent Advisor

Re: script for daily backup

got the info. thanks