TrainMyAI stores its information in two places on your server – a MySQL/MariaDB database and a regular Linux directory. An effective backup must contain both sets of information.

The database and data directory were created during the initial installation of TrainMyAI. They are set in the config.ini file in the trainmyai directory, in the [database] section and data_directory line respectively.


It is possible to migrate the TrainMyAI database to a different server or move the TrainMyAI data directory. However, in order to prevent data corruption, this requires your TrainMyAI site to be temporarily taken down.

Below are the steps required to perform a safe migration:

  • Set site_offline = on in the config.ini file in the trainmyai directory and save changes.
  • Visit your TrainMyAI site to confirm that a maintenance message is shown.
  • Wait at least 1 minute to allow any asynchronous processes (initiated by cron) to complete.
  • Move the database (e.g. using mysqldump) and/or data directory as required.
  • Make the required changes to config.ini to reflect the changes performed.
  • Set site_offline = off in config.ini and save changes.
  • Visit your TrainMyAI site to confirm that everything is working normally.

Admin Recovery

An administrator for a TrainMyAI site can reset the password for any other user in the web interface. If you have forgotten the password for all admin users, follow these steps for recovery:

  • Ensure sign_up = on in the config.ini file in the trainmyai directory.
  • Sign up as a new user in the TrainMyAI web interface, with a temporary username such as recovery.
  • Back in config.ini, set rescue_admin to this username, e.g. rescue_admin = recovery and save changes. This will give the new user full admin privileges.
  • Refresh the TrainMyAI web page, and the 'Manage' menu should appear.
  • Choose 'Users' from the 'Manage' menu and click to reset the real administrator's password.
  • Log out as the temporary user and log in as the real administrator using this new password.
  • Choose 'Users' from the 'Manage' menu and delete the temporary user.
  • In config.ini, change the edited line back to the rescue_admin = and save changes.

Getting help

If you encounter any problems with TrainMyAI, please contact us and we'll be happy to help.