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?

what do you need exactly??

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

try this

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

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]

#!/bin/bash

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

akshay we don't require commands like bpbackup etc etc etc?
please tell how to run this script also.......

@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.

1 Like

hey pikki thanx for help i just wanted to know how to run ur srcipt.........nothing else..............

Forum Rule

(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.

We know that due to bumping up of post, your one post was closed regarding same task, Please read Forum Rules

Following might help you to start

Writing shell scripts - Lesson 1: Writing your first script and getting it to work

UNIX & Linux Shell Scripting (Introduction, The Basics)

A Quick Introduction to Unix/My First Shell Script - Wikibooks, open books for an open world

1 Like