Skip to main content
Skip table of contents

Performing Appliance Backup and Recovery

Overview

You can migrate the database from a malfunctioning Login Enterprise instance to a functional one, preserving your data and configuration. Please note that encrypted data, such as user passwords and application secrets, will not be transferred, but your overall configuration will remain intact.

This section outlines the process for creating a backup of the internal database to facilitate restoration on a rebuilt Appliance. Additionally, it provides instructions on how to configure a new Appliance to connect to an existing external database and recover configurations.

External Database

If you still have access to the original Appliance, the best way to reconnect to your external database is to back up and restore your internal database. The database connection information is stored on the Appliance itself, so restoring the Appliance data will also restore access to the external database. If possible, use the Internal Database instructions below.

Otherwise, you can simply set up a new Appliance and configure it to connect to the existing database.

Avoid directing two Appliances to the same database simultaneously.

If you need to replace an Appliance, it's straightforward to create a new one and configure it to use the existing database. Please contact Support for additional information about cleaning up encrypted data.

Internal Database

For the internal database, it's easiest if you can obtain a copy of the database before your Appliance VM becomes inaccessible. Otherwise, it may be possible to get the data files from the boot disk by attaching it to another VM.

You must ensure that all the Login Enterprise services are stopped before proceeding with the steps below.

  1. Log in to the Appliance with the admin account, go to Troubleshooting, and open the Bash shell.

  2. loginvsid stop

  3. systemctl stop docker

  4. cd /home/admin

  5. tar -zcvf data.tgz /loginvsi/data /var/lib/docker/swarm /loginvsi/.env /certificates /usr/local/share/ca-certificates /home/admin/LE_key

  6. loginvsid start

  7. Download /home/admin/data.tgz to some other machine.

We use tar to ensure proper preservation of file permissions and ownership. This tar file can be restored to the original Appliance or a new Appliance if you want to clone it.

To restore the data to the same Appliance or install the database on a new Appliance, follow these steps:

  1. Upload data.tgz to /home/admin on the new Appliance

  2. loginvsid stop

  3. systemctl stop docker

  4. cd /

  5. rm -rf /loginvsi/data /var/lib/docker/swarm

  6. tar -zxvf /home/admin/data.tgz

  7. nano /loginvsi/.env

  8. Stop here and update the ALLOWED_CLIENT_URLS field in the .env file to reflect your current IP address and/or hostname. You will be unable to start the services if ALLOWED_CLIENT_URLS is wrong. Save and exit the editor. Then:

  9. update-ca-certificates

  10. loginvsid restart

After logging back into the Login Enterprise, your data and configurations will be automatically restored.

You can clone an Appliance in this way, too. If you are using the internal database, you can restore an Appliance to multiple VMs, and they will not conflict.

Note that your Launchers and Test Users need to be restricted to a single Appliance. Multiple Appliances cannot share Launchers or users.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.