NFS backup server

Can someone please point me to a howto that covers a simple LAN NFS backup server? One that I only boot to backup from three Linux-only boxes then turn off.

Thank you.

I have a small ‘backup system’ that I only turn on when I wamt to make a backup (or when I have to recover a file of course). I use a combination of

rsync -ax --delete --numeric-ids --relative


cp -al

in the way it is done by rsnapshot

I do the rsync phase (the transport to backup the files) over the network (the r of rsync), but you could also do this:
a) by exporting the place where you want to backup to from the backup system, mounting them on the others symtem(s) and running the rsync local on the other systems;
b) exporting the (root of) the parts you want to backup from the other systems (e.g. /home), mounting them on the backup system and running rsync local on the backup system.

I would prefer option b) because that keeps all handling on the backup system (as on my own remote rsync) and adding/removing systems is then also mostly done on the backup system. Also, when the other systems are running when you start the backup system (and thet NFS mountings are in the backup systems /etc/fstab) the mounting is done automatlicaly (regardless if somebody is lofged in or not), where, in case a) you have to initiate the mounting on the backup systems (that means logg in and become root on all those systems).

The difference between b) and my own way is not that big. In one case you have to configure NFS and in the other case rsync (both on server and client side).

Originally Posted by ionmich
*Can someone please point me to a howto that covers a simple LAN NFS backup server? One that I only boot to backup from three Linux-only boxes then turn off.

Thank you.*

Here are some instructions that I have used in the past.

3.*Setting Up an NFS Server

This gives a good description of how it works and various options that you will want to decide on. The great thing is that YaST makes it really nice to set up NFS shares. If you use YaST and that how-to, you should have a NFS server set up in no time.

I decided to follow option B of your suggestion. Since I have had many problems in the past I will try to detail my steps systematically. Box A is my backup computer. Boxes B and C are the two user machines.

  1. I turned off my modem but left my router running. This is to avoid any possibility of data getting out to the internet while testing.
  2. There are no firewalls running.
  3. Using Yast, I configured box B to be an NFS server by exporting directory /home to (box A).
  4. I booted box A and configured it as an NFS client. When I gave it the address of box B ( it found the directory /home. Everything looks good so far.
  5. I booted box C and configured it to be an NFS server by exporting directory /home to (box A).
  6. I went back to box A. When I tried to add box C ( it found the directory /home but when I clicked on “OK” it returned the error message “Unable to mount the NFS entries from /etc/fstab”.

I am of course mounting to two different directories. Box B to /home/FROMION and box C to /home/FROMINGRID.

Your help is much appreciated.

You might want to try those mount commands in a terminal to see any information that might have. Also check the logs, probably /var/log/messages after an attempted mount. And post your NFS entries in /etc/fstab for us to see.

Also what are the versions of the OSes on the machines? All 11.2?

Thanks for the help. From a terminal…
mount /home/FROMINGRID
mount.nfs: access denied by server while mounting

No NFS messages in /var/log/messages.

My /etc/fstab shows… /home/FROMION nfs defaults 0 0 /home/FROMINGRID nfs defaults 0 0

Yes all three boxes are running 11.2. Note that the box B connection ( succeeds. Permissions on the /home directory on box C have been changed to allow users access.

Careless error no 43 - IP address starts with “182” instead of “192” and user needs glasses.

Observed when /etc/exports was displayed in clear text console window.

Sorry all, for wasting your time.

This thread is shown as solved and I too am interested in a simple NAS nfs backup approach. I have a few NAS servers setup and working fine no problems there. What was your simple method as you just went through the exercise. Did you use YAST / NSYNC / or something else?

I have not yet resolved all the network glitches. Both box C and B must be running for everything to work from box A. The “rsync” method suggested by hcw appears to do the job, but I want to automate the process so that merely powering up box A (without an attached monitor) will perform the backup.

Thanks for the feedback. I will have to learn more about RSYNC and its use. Good luck with the automated approach, I may stick with something really simple like YAST backup if it works, have to give it a try first to know.

Everything works now. I chose to make the backup box A the server and box B and C clients. Box A is only powered up for the backup and runs without monitor. Backups are started from the client machine via a small script with menu choices for different parts of the file system.

Thanks everyone.

Hello ionmich,

I was on a short holiday and coming back I see you got a satifying solution. That’s perfect, however in you thread I see that you want to start the backup automatic on the starting of the backup system. I fail to see how you did that part of your wish.

I see several possibilities here:

  1. a crontab entry (for root) using the *@reboot *time specification (see man crontab (5));
  2. an entry in* /etc/inittab* that runs only once (no respawn). When I am correct that you do not have a graphical system system at all, you could then run that at runlevel 5 (instead of xdm/gdm/kdm) and boot in runlevel 3 when you want for some reason start the sytem without the automatic backup;
  3. create some start/stop script in /etc/init.d with all the singin and dancing that belongs to it.

I think these 3 are here in increasing level of sophistication.

Hello hcw,

I haven’t got to that stage yet. I have run into another problem along the way. Everything worked, for a short while. I was using “rsync -av /home/ion/DATA/ /mnt/SERVER/ION/DATA”. But then I installed something new and I started getting errors like…

rsync: failed to set permissions on “/mnt/SERVER/ION/DATA/MESS/obj/sdl/mess/mess/machine/tms9901.o”: Operation not permitted (1)

I took this to mean that the file permissions were incorrectly set, but on closer inspection every user has read and write permission on this particular file. Moreover I am executing rsync from Box B as root. I need to resolve this first.

By the way, thanks for staying with this post. I’ve been away myself so it takes some time to re-start the debug process.

The server side permissions (in Yast>Network Services>NFS Server) had changed (no doubt my doing), and “root_squash” was invoked. That meant no root privileges from the client machine. Changing it to “no_root_squash” solved the immediate problem.