[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need suggestions on a backup issue



On Fri, Jul 20, 2012 at 07:04:35PM +0100, Tixy wrote:
> On Fri, 2012-07-20 at 09:50 -0600, Paul E Condon wrote:
> > I need a way to test in Bash whether, or
> > not, there actually is a disk mounted at /media/wdp8. 
> 
> A bit hacky, but what I do in my backup scripts is...
> 
>    if mount | grep -q " /media/wdp8 "
>    then
> 	...
>    fi

One other suggestion:

If you mount a backup drive on /media/wdp8/, have your backup
program start writing to /media/wdp8/backup/, a dir that exists
on the drive but not on your underlying filesystem.

If the directory doesn't exist, it ought to exit with an
appropriate error rather than filling your root filesystem.

-dsr-


Reply to: