Rsync over an NFS mount (Scanned @ Decoma)

John Jablonski jjablonski at deluxestitcher.com
Fri Apr 1 20:44:19 GMT 2005


Lester_Linnell at decoma.com wrote:

>Now , If I reboot machine 2, and forget to do the NFS mount, (actually the
>above rsync is in a crontab entry to happen automatically), then the
>/DB/plantx will be empty due to the 'delete' option of the rsync statement.
>I would assume this is a bug ???
>
>  
>
Um.....why wouldn't you have the NFS share automatically mount at boot 
time (fstab)?

And/or, like Mr. Moenkeberg suggested:
NFS_MNT="/mnt/plantx"
MOUNT_CHK=`/bin/mount -l | /bin/grep $NFS_MNT | /usr/bin/wc -l`
if [ "$MOUNT_CHK" = 1 ]
    rsync...
    exit 0
else
    echo "D'oh! You didn't mount the NFS share again!" > /var/log/rsync.log
    exit 1
fi

Works for bash on linux anyways.

Tis what I do for local backups to a USB drive. Gotta make sure it's 
actually plugged in or else your harddrive fills up REALLY quick.

-john


More information about the rsync mailing list