cancel
Showing results for 
Search instead for 
Did you mean: 

DRD Sync to update inactive disk

 
Sridhar
Occasional Contributor

DRD Sync to update inactive disk

Hi All

     I would like to place a script in the cron to update the DRD clone inactive disk on weekly basis.. Please confirm whether the command will perform this.

 

#drd sync -v -v

 

Also please share if you have any script to achive this..

2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: DRD Sync to update inactive disk

That should work.  The one change I would make is to combine the two '-v -v' into '-vv'.

 

You might also write a wrapper script that checks the return code of the command and notifies you if it succeeds or fails.

 

For example (not tested or checked for syntax):

 

#!/usr/bin/sh

LOGFILE=/var/tmp/drd-sync.log

 

drd sync -vv > ${LOGFILE} 2>&1

 

RETCODE=$?

if (( ${RETCODE} != 0 )) ; then

   mailx -s "DRD SYNC FAILED" you@yourdomain.com < ${LOGFILE}

else

   mailx -s "DRD SYNC SUCCEEDED" you@yourdomain.com < ${LOGFILE}

fi

 

Chirag Parikh
Frequent Advisor

Re: DRD Sync to update inactive disk

Hi Sridhar,

 

You can always have a preview option to check before actual execution. So you may set up a cronjob with -p option which will show the preview of actual execution. Then you may remove it and put the actual sync command in cron.

 

Thanks & Regards,

Chirag Parikh.