Skip to content

Commit

Permalink
Merge pull request #9520 from ToolJet/docs/update-docker-in-lastest-v…
Browse files Browse the repository at this point in the history
…ersion

[docs]:Add docker backup updates in version 2.36
  • Loading branch information
adishM98 committed Apr 26, 2024
2 parents 11d3832 + 8a7af72 commit c26bc3b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/versioned_docs/version-2.36.0/setup/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,22 @@ Confused about which setup to select? Feel free to ask the community via Slack:
</Tabs>

## Docker Backup
The is a Docker-specific feature that assists in backing up the database during an upgrade process. If you plan to utilize this feature, uncomment the backup service in the docker-compose file. Additionally, you need to set an environment variable: `DATABASE_BACKUP=true`. This enables the creation of a `pg_dump` file, which will be stored in the backup folder.

To restore the database from this dump, execute the following command:
The below bash script will help with taking back-up and as well as restoring:

1. Download the script:
```bash
curl -LO https://tooljet-deployments.s3.us-west-1.amazonaws.com/docker/backup-restore.sh && chmod +x backup-restore.sh
```
cat your_dump.sql | docker exec -i --user postgres <postgres-db-container-name> psql -U postgres

2. Run the script with the following command:
```bash
./backup-restore.sh
```

<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/setup/docker/backup-and-restore-v2.gif" alt="Docker - Backup and Restore" />
</div>

## Upgrading to the Latest Version

Expand Down

0 comments on commit c26bc3b

Please sign in to comment.