In it's default configuration NMIS likes to be at /usr/local/nmis8, with all of it's data held within this directory but NMIS is not required to be in this location. All, or just parts, can be moved to different directories which can be on different partitions or Logical Volumes.
Example:
Goal: To move the directories in NMIS that will continue to grow larger off of the same partition as /usr/local, at the same time to make a backup of the NMIS runtime. To accomplish this goal we first need a location where we will move/copy the files to, for this example I will use a target of /opt/nmis8. Once we have this we will copy all of NMIS8 to the new location, then edit the config files in the current location to use the new data directories.
Copy files to new directory.
cp -r /usr/local/nmis8 /opt/nmis8
Fix permissions on the copied files.
chown -Rv nmis:nmis /opt/nmis8 chmod -Rv g+w /opt/nmis8
Edit config files so that NMIS will write data to our new location, edit /usr/local/nmis8/conf/Config.nmis
# this line line 13: '<nmis_data>' => '<nmis_base>', # should change to line 13: '<nmis_data>' => '/opt/nmis8',
To test, move the existing data directores to new folders.
- Open or reload the NMIS web page and everything should still look the same
Now the next time NMIS collects or updates it will write