Category: How do I do X?


This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

How do I take backup of Appsmith database (MongoDB)?


I am looking to take automated backups of the apps I created, but I can't find the database in MongoDB. I want to know where the apps are stored, so I can run a crontab job to backup to another location.


To take automated backups of the apps created, the user needs to locate the stacks/data directory where the information and data for the created apps are stored. Once located, a crontab job can be set up to backup the data to another location.

Here's an example command that can be used in the crontab job to backup the data:

mongodump --db <database-name> --out <backup-directory>

Replace <database-name> with the name of the MongoDB database where the app data is stored and <backup-directory> with the path to the directory where the backups will be stored.

It's important to note that the user needs to ensure that they have the necessary permissions to access the data directory and perform the backups. Additionally, they may want to set a schedule for the crontab job based on their specific needs for backup frequency.