To refire a backup job using shell scripting..........


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting To refire a backup job using shell scripting..........
# 1  
Old 12-28-2013
To refire a backup job using shell scripting..........

how to write a code using shell scripting to refire a back up job if it fails with an error code of 196?
# 2  
Old 12-28-2013
what do you need exactly??

is it that you need to restart the backup job when it fails with error 196?

try this

Code:
BACKUPJOB <ARGS if needed>
rc=$?
while [ $rc -eq 196 ]
do
echo "restarting the job"
BACKUPJOB
rc=$?
echo $rc
done

# 3  
Old 12-29-2013
reply

well in netbackup whenever a job fails coz of error 196 then it is coz of lack of resources so i want it should keep reifiring until the job gets done...............

---------- Post updated at 12:14 AM ---------- Previous update was at 12:13 AM ----------

can u explain me how to run this code?

---------- Post updated at 12:18 AM ---------- Previous update was at 12:14 AM ----------

and what about the commands don't we require commands like bpbackup,bpdpjobs and etc etc etc?
# 4  
Old 12-29-2013
Quote:
Originally Posted by Pawan Ramnani
well in netbackup whenever a job fails coz of error 196 then it is coz of lack of resources so i want it should keep reifiring until the job gets done...............

---------- Post updated at 12:14 AM ---------- Previous update was at 12:13 AM ----------

can u explain me how to run this code?

---------- Post updated at 12:18 AM ---------- Previous update was at 12:14 AM ----------

and what about the commands don't we require commands like bpbackup,bpdpjobs and etc etc etc?
You can create function something like this [not tested]

Code:
#!/bin/bash

function BACKUP(){
                   echo "Here my Backup scripts goes"
                 }
while [ "$?" -eq "196" ]; do
    BACKUP
done

# 5  
Old 12-29-2013
repy.

akshay we don't require commands like bpbackup etc etc etc?
please tell how to run this script also.......
# 6  
Old 12-29-2013
@Pawan: We do not fulfill your requirements here. rather, we shall help to achieve them.

What do you mean by your last post? If you are not sure of how to run a script, I'd better say to take tutorials on Shell scripting.
This User Gave Thanks to PikK45 For This Post:
# 7  
Old 12-29-2013
@pikki45

hey pikki thanx for help i just wanted to know how to run ur srcipt.........nothing else..............
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Refire a backup job.

how to code script using shell scripting to refire a backup job if it fails with an error code of 196? (1 Reply)
Discussion started by: Pawan Ramnani
1 Replies

2. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

3. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

4. Shell Programming and Scripting

check mail backup cron job

i have just installed a cron job to run at 3 in the morning once a week. It's difficult for me to test if it works because the email backup program takes the email service down before running the backup. I wondered if i could ask you gurus if this would work? 0 3 * * 0 ... (1 Reply)
Discussion started by: timgolding
1 Replies

5. Shell Programming and Scripting

backup Shell Scripting Need

Dear All, Am handing the 5 remote server and one backup server. all the server are the online server. so need backup files from the remote server to backup server. i need shell script with using the scp backup. Sorry for my poor english Thank you (1 Reply)
Discussion started by: vmsuresh2020
1 Replies

6. UNIX for Dummies Questions & Answers

Check that backup MX actually does its job

Hey! I have just configured an backup MX using Mail::Toaster under FreeBSD. As I'm a novice when it comes to mailservers, I need to ask someone how to check that this backup really does its job. My primare MX is unfortunately on a Dynamic IP line, but its unsusual for it to change the IP.... (4 Replies)
Discussion started by: noratx
4 Replies

7. Shell Programming and Scripting

How to schedule a job in shell scripting.

Hi all I have made a shell script to check jobs' status and send an alert based on the result. I want to run this script to run every 4 hours and I don't have access to cron. Can we schedule using shell scripting instead of cron facility? (2 Replies)
Discussion started by: johnl
2 Replies

8. UNIX for Advanced & Expert Users

At job in SHELL SCRIPTING

Hi I am using at job in my SHELL scripts.. When it prompts to enter the time for at job..I used to press enter(return) button.. After that its running the job properly, but its showing the below error UX:at: ERROR: Bad date specification.. Can some one suggest how to remove that error. ... (2 Replies)
Discussion started by: grajesh_955
2 Replies

9. Shell Programming and Scripting

Backup with shell program and cron job.

Hi, The object of my program is to take automatic backup on daily basis to different folders. I have created the respective folders. when I execute below given shell program manually it is working perfectly and taking the backup to respective folder. #!/bin/sh #script to take backup on... (1 Reply)
Discussion started by: jarkvarma
1 Replies

10. UNIX for Dummies Questions & Answers

backup job help

I have a backup program on my unix box. I run it manualy and normaly start it from the terminal. But i would like to be able to start it up threw a telnet session. I was told that i had to leave teh telnet setion open untel the backup was complete, cuase if i closed the telnet the process would... (1 Reply)
Discussion started by: Thump
1 Replies
Login or Register to Ask a Question