Ampinstmgr gone?

OS Name/Version: CentOS 7

Product Name/Version: Triton 02/12/2021 15:36 build

Problem Description: I have been running AMP for several years on my single host. I have a single ADS instance and a few game servers (Minecraft, etc.)

I had created a script that would update ampinstmgr by downloading the latest ampinstmgr and unzipping

cd /home/AMP/AMP/


unzip -o

rm -f

I would then run ampinstmgr to update my instances.

Now, it looks like that URL gives a 301 for “moved permanently”, then a 404.

What is the proper migration path? I know I see a lot of these being run in docker containers now, but I really appreciated the simplicity of just running the instances directly.

Thank you.

Backup all your Servers and create a snapshot of amp if you can

  1. Shut down all your instances but the main ADS
  2. Run sudo yum update in your CentOS console
  3. Login as the amp user sudo su -l amp
  4. Then run ampinstmgr upgradeall
  5. Now run exit to go back to your user then reboot your system sudo reboot

The old archive is no longer a thing. For Linux, you should be keeping ampinstmgr up-to-date using your systems package manager.

I’d recommend if your installation is so old that it used the old .zip installation method that you re-install AMP using the GetAMP install script. This will also make sure you’ve got access to functionality that wasn’t ever available using the old method.

Ok, sounds good. I’m assuming that the GetAMP install script will install the correct repo for ampinstmgr to be managed by yum / dnf?

Also, what would be the safest way to migrate my instances?

If you’re using the username it expects of amp (verbatim) then you don’t need to worry about that. Otherwise you can just copy over the datastore directory.

Thank you. Unfortunately I’m using “AMP” for my username. Under my AMP user, I have:

~/AMP/ - contains:

* ampinstmgr
* Modules/<variousfiles>.dll

~/.ampdata/ contains:
* instances.json
* instances.json-<date>.bak
* instances/
* instances/ADSInstance
* instances/<instance folders of minecraft, etc.>

If I run GetAMP, will that install the ADSInstance in the “amp” user folder? I’m just not sure of where to copy my current instances after running GetAMP.

Thank you again for your help.

There’s going to be a few steps involved then. What I’d suggest you do is:

  • Rename your existing AMP user to amp
  • Edit the home directory to be also called amp
  • Edit instance.json and correct all the paths
  • Run the GetAMP script and let it sort everything else out.

Thank you, I checkpointed the server and was able to get everything moved over.

For anyone with the same question, here’s what I had to do:

I use an NGINX web server in front of all of my services to act as a reverse proxy to my services, so I did not need the LetsEncrypt setup.

  • Checkpoint the server
  • Log in as my AMP user and run ampinstmgr --StopAllInstances
  • Log out of AMP and log in as root
  • Run the installer for
  • During setup, choose “no” for docker
  • During setup, choose “no” for LetsEncrypt setup
  • After setup, log in to AMP instance (port 8080)
  • Change admin password to include more complexity / special (important)
  • (optional) Move backups to make copying faster
    • Log in as AMP
    • cd ~/.ampdata/instances/ && mkdir backups
    • cd backups
    • for each instance you have, run mkdir <instance>backups
    • cd ~/.ampdata/instances/<instance>/Backups
    • mv ./*.zip ~/.ampdata/instances/backups/<instance>backups
    • after doing this with all instances, all of your backups should be in ~/.ampdata/instances/backups/<instance>backups/
    • log out of AMP user
  • Log in as root
  • cd ~/.ampdata/instances/
  • for each instance, run cp -r ./<instance>/ /home/amp/.ampdata/instance
  • Lastly, move any other scripts / utility folders from your old home directory to new directory
    • e.g. cp /home/AMP/backup_minecraft.s /home/amp/
  • Fix permissions - cd /home/amp/.ampdata/instances; chown -R amp:amp ./<instance>
  • Next, we need to properly import the instances
  • Logoff root, login as AMP sudo su - amp
  • ampinstmgr repair - this should repair / import the instances
  • ampinstmgr reactivateall - this should make sure they’re all activated
  • You MAY need to re-bind your instances / ports ampinstmgr rebind <instance> <ip> <port>
  • For me, the repair didn’t completely work, I had to manually fix my logins (was getting invalid username / password)
  • Create a test instance (can be generic, I did Minecraft)
  • cd ~/.ampdata/instances/<test instance>
  • cat AMPConfig.conf
  • Take note of the following values:
    • Security.EncIV=<encrypted string>
    • Security.EnablePassthruAuth=False
    • Security.PassthruAuthLocalOnly=False
    • Login.UseAuthServer=True
    • Login.AuthServerUrl=http://localhost:<port>/
    • Login.MetricsServerPort=12820
  • For each of your instances, edit their respective AMPConfig.conf files and update the settings to match the values from the test instance
  • For each instance, from ADS, “Edit Ports” and confirm that each instance has unique ports for the application AS WELL AS SFTP.
  • Upgrade your instances
  • (optional) Move backups back to the new data directory
  • Confirm all instances are running properly, can log into them, backups run, etc.
  • Delete old “AMP” user / data userdel --remove AMP (CAUTION: This will remove the home folder)
  • Delete server checkpoint.

Hope this helps anyone else.