You are here:

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

Print this page

Technical Documents

Accessing your backup space over NFS

Read the backup overview if you haven’t already.

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.

Although NFS is a convenient way of browsing and retrieving backups, we recommend that you make your backups using the rsync protocol.

Unless you’ve been told otherwise when your server was provisioned, or made another arrangement with us (eg merged separate backup space allocations into a single space), backup accounts are 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

I can’t find my backups!

If you have previously used “rsync”:“backuprsync” to back up your files, you will find your files in the hidden directory called .rsync_root; remember to add the -a switch to the ls command.


 ls -a /mnt/backup

IP restrictions

NFS mounts may only be made from IP addresses registered to your Virtual Machine or Dedicated Server. 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.

User restrictions

If you’ve configured your system along the lines described so far, only the root user will be able to mount the backup space as access will be attempted from privileged ports. If you find this too inconvenient (ie to avoid the need to use sudo, or to su to root), there is a two step process (which must be done with root privileges) to allow limited users the same access. “Limited user” includes admin on a Symbiosis system and probably also any accounts you created with the adduser utility.

First off change the ownership of the mount point to give your limited user control:-


 chown admin /mnt/backup

Then make a further addition to the line in /etc/fstab, which should now look like this:-


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

If you compare that to the line higher up the page you see that the users flag was added to the nfs line.

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.

I get a “wrong fs type, bad block, bad superblock […]” error

You need to install the package nfs-common if you are on Debian based systems and nfs-utils if you are on CentOS.

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

“Bytemark give us an edge over our competition as we have direct control over our hosting servers, with the ability to configure any aspect without impediment. And their fees are so cost-effective that we can offer real value to our customers too.”

Andrew Cope
Evergreen Computing Ltd.

Premium Dedicated Premium Dedicated

Our premium dedicated servers, built to order by HP, will deliver the highest possible uptime.

Built by handBuilt by hand

Because we build our servers by hand, you get high power, low cost, and excellent build quality.

Control Panel

Our control panel allows you to register and renew your domains, and update payment details.