NEW!

You are here:

Home > Support > Technical Documents > Accessing your backup space over NFS

Print this page

Technical Documents

Accessing your backup space over NFS

NFS is a convenient way of accessing files across a network; it allows a Linux system to access files on a remote server in exactly the same way as it accesses its own files, with only a little extra latency for the network access.

Unless you’ve made another arrangement with us (customers with more than 1 hosting product with us), backup accounts are usually named after your Virtual Machine or Dedicated Host, so e.g. if your VM is called joebloggs.vm.bytemark.co.uk your backup space account will be accessible at joebloggs.backup.bytemark.co.uk:/store/backups/joebloggs.

Note that file ownership information will not be preserved. Any files written to your backup directory will have their permissions “squashed” to an arbitrary user ID which is different for each backup account. If preserving file ownership is important to your backup regime, you should only store files in an archive file format (such as tar or zip).

Setting up the mount

To mount and unmount the backup space on /mnt/backup, you will need the following inserted into your fstab (all one line):

joebloggs.backup.bytemark.co.uk:/store/backups/joebloggs
/mnt/backup
nfs proto=tcp,nolock,noauto,mountvers=3,nfsvers=3,intr 0 0

For this to work you will also need to create the /mnt/backup directory manually by running:

mkdir /mnt/backup

Please make sure you have the noauto option in the options in /etc/fstab or your machine may simply not boot in the event of a network problem.

When you umount, we’d advise using umount -l. This will allow the system to stop using the backup space even if the server is down or there’s some kind of timeout on NFS.

Also, we would advise that you add the mounting and umounting of the backups space as part of your backup scripts rather than leaving a long term mount open. This will minimise any effects of the backup server being unavailable for any length of time

Possible NFS issues

Debian/unstable users please note

As of 1st May 2008 there is a bug in the mount command which ignores the “-o tcp” option. If you find your mounts just hang, you should downgrade your mount package to the one found in etch, and that should fix the problem.

IP restrictions

NFS mounts may only be made from IP addresses registered to your Virtual Machine or Dedicated Server, and only from privileged ports (i.e. only the root user on your will be able to mount the directory from these IP addresses). Any other attempts will result in “permission denied”. If you have more than one IP address allocated to your host, you may find that Linux tries to use the “wrong” address to mount from. Just ask support to add your extra address to your backup account’s access list if you suspect this is the problem.

Locking horrors

NFS can implement file locking but we recommend that you don’t bother (in fact we will always ask you to disable it before we can help diagnose NFS problems). Use the nolock option. Locking should not be needed for backup applications; if you find your backup space simply hangs, locking is likely enabled.

“RPC: Timed out” error

Among other things, this may mean that you’ve forgotten to install the nfs-common package under Debian. Type “apt-get install nfs-common” to correct this. Also make sure you have added joebloggs.backup.bytemark.co.uk to your portmap service in /etc/hosts.allow.

My machine hangs when I boot

If you are adding your backup space mount to /etc/fstab, please make sure it’s listed as noauto. Otherwise in the event that the backup server is unavailable your machine may not complete booting.

Selected tags
  • Backup [X]
More tags (see all)

“In five years I've had zero unplanned downtime. But what I like best about Bytemark is their polite, prompt and knowledgeable support.”

Tom Dyson
Torchbox Ltd.

The TeamThe Team

Find out about our experienced, approachable and committed staff that make up Bytemark team.

forumForum

Visit our active forum where you can post queries and generate discussion.

ExtrasThe Team

A server alone isn't quite enough to host a site robustly — our extra services are all you'll ever need.