Skip to content

Relocating the AMP Datastore

Greelan edited this page Jan 30, 2020 · 17 revisions

If you need to relocate the AMP datastore, the best way to do this on both platforms is using a symbolic link.

Linux

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.

  1. As root or sudoer, make a new directory for the instance(s) in the new PATH (eg in /mnt or /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
  1. Switch to the amp user and stop AMP:
sudo su -l amp
ampinstmgr -o
  1. 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/
  1. 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.

Windows

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.

Clone this wiki locally