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.
There's more than enough reasons not to do this. Here's a couple:
It's rather opaque for the guy that comes after you, and as it is non-standard.
It violates the FHS
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.
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.
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.
/srv
is the proper place, although many programs still expect to find their data under/var
.