Migrate Applications
On Appsmith, you can migrate all Appsmith data from one instance to another or just migrate necessary applications.
Steps to Migrate entire Appsmith Data onto instances:
Backup the old VM
- Dump the MongoDB data from the old VM via the command:
mongodump --uri "mongodb://<rootUsername>:<rootPassword>@localhost:27017/appsmith" --out=/tmp/appsmith-mongo-dump
- Copy the dump file to the new VM
- Open the file
encryption.env
and note the values in this file. The values here are important for Appsmith to be able to read sensitive information in the new installation.
Restore the backup on the new VM:
The restore would end up deleting all the existing data in the mongo database of the newly installed appsmith instance
- Install Appsmith via the install.sh script.
- Restore the dump on the newly created MongoDB container via the command:
mongorestore --drop /tmp/appsmith-mongo-dump -d appsmith --uri=mongodb://<rootUsername>:<rootPassword>@localhost/appsmith
- Open the file
encryption.env
and change the variablesAPPSMITH_ENCRYPTION_PASSWORD
&APPSMITH_ENCRYPTION_SALT
to the same ones as the old VM. This is important because sensitive data in Mongo is encrypted using these credentials. Without this, you risk corrupting any passwords you've saved. - Restart the Appsmith system using the command:
sudo docker-compose down && sudo docker-compose up -d
Import/Export applications
You can import or export the desired application to any workspace, either in the same or a different Appsmith instance.
Applications are forward compatible from Appsmith version 1.6.9.
Applications built in an older version of an Appsmith instance will work when imported into a newer version of an Appsmith instance.
Export application
You can sync your application to a Git repository or export your application as a JSON file to your system.
Follow the steps below to export your application as a JSON file:
- Go to your workspace homepage and navigate to the app you want to export.
- Click on the menu button at the bottom of the Application card and select “Export.”
Import application
You can choose one of the below ways to import an Appsmith application.-
- Import from a Git Repository ;
- From an application JSON file.
Import from an application JSON file
If you have exported an application as a JSON file, you can import the same application to any workspace or Appsmith instance.
Follow the steps below to import an exported (JSON file) application -
- Go to your workspace homepage and navigate to the menu button of the workspace.
- Click the menu button (next to +NEW) and select the “Import” option.
- In the import pop-up window, click on import from file and pick the JSON file from your system’s memory.
- Once the file is imported, you can see a datasource configuration Modal (if the imported app had a datasource connection) where you can configure the datasources used by the imported application.
As a security measure, we do not export any config values used for the connecting datasource during the import operation. So either you have to configure it in the datasource configuration modal, or you can skip this and choose to configure it later
When you import the application into the destination instance/ workspace, it's a new one, meaning source and destination applications are detached, and changes are not synced.
Import from a Git repository
If you have an application connected to Git version control in Appsmith, you can import the Appsmith application from your Git repository into any workspace. For more information, check out Import from Repository.