Skip to main content

Restore Database

This page explains how to restore the Appsmith internal database backup using the appsmithctl utility.

Prerequisites

Before starting, ensure the following:

  • You need a self-hosted Appsmith instance up and running. If you haven’t installed Appsmith, refer to the Installation guides. This guide assumes you are working with an existing installation.
  • Ensure you have at least 2 GB of free storage available to perform restore tasks.
  • Access to execute docker-compose or kubectl commands, depending on your deployment setup.
  • Verify that the backup archive file you want to restore is available.

Restore database backup

Follow the appropriate instructions based on your deployment environment:

Follow these steps to restore Appsmith database backup for Docker-based installations:

  1. Copy the backup file into the container:

    docker cp ./appsmith-data.archive appsmith:/appsmith-stacks/data/restore/
  2. Import the backup data:

    docker-compose exec -it appsmith appsmithctl import_db
  3. Copy the docker.env file and add the path for the docker.env file if not present in the installation folder.

    docker cp ./docker.env appsmith:/appsmith-stacks/configuration/
  4. Restart the Appsmith server to apply changes:

    docker-compose exec -it appsmith supervisorctl restart backend

Troubleshooting

If you encounter any issues during the restore process, consider the following:

  • Ensure you've copied the backup archive to the correct folder within the container or pod.
  • Verify that you have the required permissions to execute docker-compose or kubectl commands.
  • If restarting the pods fails, check the logs for errors. For more information, see Get Container logs guide.

If you continue to face issues, contact support using the chat widget available in the bottom-right corner of this page.