How to Backup/Restore TRAINS-server when moving from AMI to local machine

6/26/2019

I recently started using TRAINS, with the server in AWS AMI. We are currently using v0.9.0.

I would like to move the TRAINS-server to run on our on-premises kubernetes cluster. However, I don't want to lose the data on the current server in AWS (experiments, models, logins, etc...). Is there a way to backup the current server and restore it to the local server?

Thanks!

-- Oren
deep-learning
kubernetes
trains

1 Answer

6/26/2019

Since this package is quite new, I'm making sure we are both referring to the same one, TRAINS-server https://github.com/allegroai/trains-server (which I'm one of the maintainers)

Backup the persistent data folders in the TRAINS-server AMI distribution:

  • MongoDB: /opt/trains/data/mongo/
  • ElasticSearch: /opt/trains/data/elastic/
  • File Server: /mnt/fileserver/

Once you have your Kubernetes cluster up, restore the three folders to a sharable location. When creating the TRAINS-server deployment yaml make sure you map the sharable location to the specific locations the container expects, e.g. /mnt/shared/trains/data/mongo:/opt/trains/data/mongo

Start the Kubernetes TRAINS-server, it should now have all the previous data/users etc.

-- Martin.B
Source: StackOverflow