-
-
Notifications
You must be signed in to change notification settings - Fork 41
Relocating the AMP Datastore
If you need to relocate the AMP datastore, the best way to do this on both platforms is using a symbolic link.
Currently symlinking AMP on Linux only appears to work correctly if the symlinking occurs at the instance directory level, eg /home/amp/.ampdata/instances/ADS01 or /home/amp/.ampdata/instances/Minecraft01. The instructions below reflect that. A possible future update will allow a different location to be specified for the entire datastore.
- As root or sudoer, make a new directory for the instance(s) in the new PATH (eg in
/mntor/srv, or wherever you want the instance(s) to be moved to) - substitute the full path for 'PATH' in the commands below:
sudo mkdir -p PATH/ampinstances
sudo chown amp.amp PATH/ampinstances
sudo chmod 775 PATH/ampinstances
- Switch to the
ampuser and stop AMP:
sudo su -l amp
ampinstmgr -o
- Then, for each instance that you want to relocate, move the instance directory (referred to as 'INSTANCEXX' below) to the new location, and create a symlink in its place:
mv /home/amp/.ampdata/instances/INSTANCEXX PATH/ampinstances/
ln -s PATH/ampinstances/INSTANCEXX /home/amp/.ampdata/instances/
- Then restart AMP (if you want to start all instances, not just boot-time instances, then use
ampinstmgr -a):
ampinstmgr -b
exit
Note that if an instance is symlinked, and then later deleted through AMP, only the symlink is removed. The actual data directory to which it was symlinked will remain, and needs to be manually deleted.
Todo: Using mklink
Alternatively on Windows, you can edit the InstanceStore field in the HKEY_LOCAL_MACHINE/SOFTWARE/CubeCoders/AMP/InstanceManager registry entry. You'll also need to edit the Instances.json file (while all AMP instances are stopped!) to update the locations.