Dirk Melchers wrote:
>   
>>> Keith Wrote:
>>> I was incredibly busy, so I turned off dirvish to that machine
>>> rather than fix the problem. <snip the part about keith losing
>>> the drive>
>>>
>>> I added this to the end of the pre-client bash script:
>>>
>>> ---------------------------------------------------------------
>>> ...
>>> if ps -C rsync > /dev/null
>>>       

Sorry for your loss, Keith.
>> Asheesh wrote:
>>
>> A problem with Keith's suggestion is that if any user at all is  
>> running rsync, then the dirvish cron job will fail to start.
>>
>>     
> Dick wrote:
>
> The problem with your solution is, that it won't do any backups until  
> all "long-running" backups are finished.
>
> So I think, the solution with putting something in the pre-client- 
> script to check if THIS backup is already running and then not  
> starting a second one is better for everyone, who does backups of a  
> lot of different servers where just some are "slow". So these will  
> only get a backup every second day, but the "fast" server get backed  
> up every day.
>
> So maybe a combination of both solutions would be good... ;-)
>
>   
I think that is a good identification of the needed solution.  What 
about looking for MULTIPLE conditions in Keith's 'ps' line?  My first 
thought was to look for a dirvish process that contained the current 
running vault name, but I think that condition will ALWAYS be true by 
the time dirvish gets along to running the pre-client command.  My next 
thought was to maybe count how many dirvish processes were running that 
contained the vault name but I quickly dismissed that as being 
potentially too complicated.

My current thought is that MAYBE we could do a ps to grep for rsync AND 
the path to the vault.  I suppose this could be configured manually, but 
adding it into the dirvish code would provide a built-in way for dirvish 
to prevent vault backup wrapping.

I was playing around with a ps command line trying to get this done in 
one command line but ps would keep returning the grep line causing every 
test to return true.   Someone in the irc://freenode/#Dirvish channel 
clued me into a grep command that works -- although I STILL have no idea 
WHY. (I have yet to find the documentation to explain what this command 
is doing.)

Keith,  try this line on for size. (You'll have to substitute your vault 
path or tree: path)

if ps ax | grep r\\sync.*$VAULTPATH > /dev/null ; then


OK...well I'm off to do other things.  I *STILL* haven't found WHY that 
grep statement works!

-- 
Richard
*Don't forget about the dirvish irc channel for additional support!*
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish

Reply via email to