This post is more than 5 years old

1 Rookie

 • 

88 Posts

1322

May 17th, 2007 12:00

Cloning Scheduling?

If I want to schedule a clone job after the regular jobs have finished and I don't want to use the Automatic cloning option in the GROUP? Is the only way to do it by manually right clicking on volume / save set and run clone / or by a cron job in the operating system?

What I need to do is clone several groups, I was told the Automatic cloning feature for a lot of clients is not a good idea you can run into drive contention while the clone is running but I dont know if this is the case? What is best practice for this scenario? Thanks in advance.

1 Rookie

 • 

88 Posts

May 30th, 2007 11:00

It seems like the script is not running at all can't find the reference to the script. Do you have an example with one that you could post with the script names in there without server names?

1 Rookie

 • 

88 Posts

May 30th, 2007 11:00

I got the following error when running the script. Here is the script word for word as well just in case.

#!/bin/sh

OK_FLAG=`/usr/ucb/ps -auxw | grep -i savegrp | grep -i NDMP_DataMover2 | grep -v grep | wc -l`
if (( $OK_FLAG < 1 ))
then
nsrndmp_clone -S -e `date +%m/%d/%y` -s server.com -b "NDMP DataMovers Clone" -g "NDMP_DataMover2"
else #Reschedule clone
echo "$GROUP cloning has been delayed 10 minutes" | mailx -s "$GROUP cloning has been delayed 10 minutes" legato_info
at now + 10 minutes <
/var/adm/etc/datamover2_clone > /dev/null 2>&1 EOF
fi

-------------
ERROR MESSAGE
-------------

./datamover2_clone: syntax error at line 12: `end of file' unexpected

12 Posts

May 30th, 2007 11:00

Was it able to reschedule itself and then errored on the restart?

12 Posts

May 30th, 2007 11:00

Get rid of the ">" from

/var/adm/etc/datamover2_clone > /dev/null 2>&1 EOF


and move EOF to a new line:

/var/adm/etc/datamover2_clone > /dev/null 2>&1
EOF

Hopefully this will get displayed correctly.

12 Posts

May 30th, 2007 11:00

Try entering the full path of "nsrndmp_clone".

1 Rookie

 • 

88 Posts

May 30th, 2007 11:00

bash-2.03# cat datamover2_clone
#!/bin/sh

OK_FLAG=`/usr/ucb/ps -auxw | grep -i savegrp | grep -i NDMP_DataMover2 | grep -v grep | wc -l`
if (( $OK_FLAG < 1 ))
then
nsrndmp_clone -S -e `date +%m/%d/%y` -s server.com -b "NDMP DataMovers Clone" -g "NDMP_DataMover2"
else #Reschedule clone
echo "$GROUP cloning has been delayed 10 minutes" | mailx -s "$GROUP cloning has been delayed 10 minutes" legato_info
at now + 10 minutes < /dev/null 2>&1
EOF
fi

bash-2.03# ./datamover2_clone
./datamover2_clone: 0: not found <--- ERROR
bash-2.03#

1 Rookie

 • 

88 Posts

May 30th, 2007 12:00

There probelem was as follows:

#!/bin/sh

OK_FLAG=`/usr/ucb/ps -auxw | grep -i savegrp | grep -i NDMP_DataMover2 | grep -v grep | wc -l`

if [ $OK_FLAG -lt 1 ] "<---FIX FOR PROBLEM"
then
/nsr/sbin/nsrndmp_clone -S -e `date +%m/%d/%y` -s server.com -b "NDMP DataMovers Clone" -g "NDMP_DataMover2"
else #Reschedule clone
echo "$GROUP cloning has been delayed 10 minutes" | mailx -s "$GROUP cloning has been delayed 10 minutes" legato_info
at now + 10 minutes <
/var/adm/etc/datamover2_clone > /dev/null 2>&1
EOF
fi


You compare numeric values using "lt" not the less than or greater than signs. This was on Solaris... Thanks for your help!! = )

12 Posts

May 30th, 2007 12:00

That makes sense. I'm on HPUX :)
No Events found!

Top