Rsync over an NFS mount (Scanned @ Decoma)

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

Lester_Linnell at 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:
MOUNT_CHK=`/bin/mount -l | /bin/grep $NFS_MNT | /usr/bin/wc -l`
if [ "$MOUNT_CHK" = 1 ]
    exit 0
    echo "D'oh! You didn't mount the NFS share again!" > /var/log/rsync.log
    exit 1

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.


More information about the rsync mailing list