Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Right now I have a small server handling a few things—DNS, HTTP serving, email, etc—and am storing all my data in /data/, a directory I create on all servers I administrate.

The reason I like to store data in /data/ is so that I can easily back up the important data by just tar-ing the entire directory. If I were to backup the entire system, I'd have a lot of extra data that I don't need (at the moment, I backup the system once a week and the /data/ directory nightly).

Since I'm planning a relatively large setup right now (10+ machines), I'm wondering if there's any reason I should store data in /var/ or another directory instead of /data/.

Thanks for the advice.

share|improve this question
up vote 6 down vote accepted

There's more than enough reasons not to do this. Here's a couple:

  1. It's rather opaque for the guy that comes after you, and as it is non-standard.

  2. It violates the FHS

  3. It will mess up things like Selinux and AppArmor by not adhering to conventions. You will either need to write your own policy or disable Selinux and AppArmor all together.

  4. After updates to packages that alter configuration files to a new format or to have new features, you will have a relatively hard time porting your changes to the new configuration file.

Backing up to your servers important information can be just as easily done by backing up /etc and /var in their intirity.

share|improve this answer
Remember one of the key points of the FHS. - Local placement of local files is a local issue, so FHS does not attempt to usurp system administrators. - A local administrator cannot violate the FHS, FHS does not for local admins to do anything. FHS is there to make life easier for sysadmins, not to limit sysadmins by some rigid set of arbitrary rules. If you have a need for something outside of what the FHS describes then you are free to do what works best. – Zoredache Aug 7 '11 at 6:36
Notice the fact that you say need. – wzzrd Aug 7 '11 at 7:28
Also, backing up /var in its entirety as you mention will include a lot of crap. For example everything under /var/cache/ by the FHS definition has next to no value being backed up. – Zoredache Aug 7 '11 at 7:47
Actually, I think it depends on what data it is. I've several times seen a 4 GB /, a large partition on /data and symlinks like /home -> /data/home. I think this is a fine way to handle it. Separate user data from the system personality. If /data is on the same device as / or /var then I don't see the point. – Jakob Borg Aug 7 '11 at 10:59

If you configure all your apps to find config files and store information in /data/ and they works properly, i don't see any negative side.

share|improve this answer
As long as it's fully documented. – womble Aug 7 '11 at 4:05

/srv is the proper place, although many programs still expect to find their data under /var.

share|improve this answer
Downvoted, because all programs expect to find their data in /var. /srv won't be used unless explicitly configured. – wzzrd Aug 7 '11 at 5:24
@wzzrd: Oh, sorry, I assumed the asker wasn't an idiot when I wrote that. – Ignacio Vazquez-Abrams Aug 7 '11 at 5:28
The original question also mentions e-mail. Is too something you believe belong under /srv/? – andol Aug 7 '11 at 6:52
@andol: Personally no, but if another sysadmin wants to have it under /srv then so be it. – Ignacio Vazquez-Abrams Aug 7 '11 at 6:58
i think wzzrd's point was that it introduces a large overhead of recongiruing every app for no gain, which is a fair point imho. – Sirex Aug 7 '11 at 7:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.