Expected Outcome
The new, restored Terraform Enterprise instance will have the same console UI settings as the original instance.
Use Case
When you restore a backup to a new Terraform Enterprise instance, you may need to import the console settings from the original server to the new one. The console settings are the configurations found in the UI at https://<TFE_HOSTNAME>:8800/settings.
You can export these settings, including necessary hidden values like the encryption password, using the replicatedctl command with the --hidden flag.
Note: The
enc_passwdpassword is used to encrypt and decrypt the internally-managed Vault unseal key and root token. This is not required if you opt out of using the internally-managed Vault.
Procedure
Follow these steps to export the console settings from the original server and import them to the new server. Importing settings requires an application restart.
- Connect to the original Terraform Enterprise instance using SSH or a similar remote protocol.
Export the current settings to a
.jsonfile. The--hiddenflag is required to include sensitive values like the encryption password.$ replicatedctl app-config export --hidden > ptfe-settings.json
- Copy the
ptfe-settings.jsonfile to the new Terraform Enterprise instance. - Connect to the new Terraform Enterprise instance.
Import the settings from the JSON file.
$ replicatedctl app-config import < /path/to/ptfe-settings.json
Stop the Replicated services to apply the new settings.
$ replicatedctl app stop
Confirm that the services have stopped.
$ replicatedctl app status
Restart the Replicated services.
$ replicatedctl app start
Verify that the settings were imported successfully. You can export the configuration again on the new instance to compare, or check the UI to confirm the settings are correct.
$ replicatedctl app-config export