Testing if nfs filesystem is mounted

Hello,

I have a backup script that backs up my system to a nfs mounted file system. The mount point on my local system is /backup.

I want my script to check whether the nfs file system is mounted on /backup before actually backing anything up. Even if the nfs file system was NOT mounted, there would be a /backup directory on my local system.

Is there a way I can have my script actually check that the nfs filesystem is mounted on /backup?

Best way depends on the specific OS which no one ever mentions. Some possibilities are "nfsstat -m" and "df /backup". Various option to df may be easier to script than others. You will need to look at your man page.

Thanks. I used the following command:
/bin/df -t nfs | /bin/grep /backup

Thanks again for your help.