Skip to content

Commit

Permalink
chore: remove data-migration image (formbricks#4605)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattinannt authored Jan 15, 2025
1 parent d3adc16 commit 21644f5
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 112 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/release-docker-github-data-migration.yml

This file was deleted.

80 changes: 77 additions & 3 deletions apps/docs/app/self-hosting/migration-guide/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,82 @@ export const metadata = {

# Migration Guide

## v3.1

<Note>
We released a new automatic data migration approach with Formbricks 3.0. If you are on a version older than v2.7, you need to migrate step-by-step through the earlier versions first (e.g. 2.4 → 2.5 → 2.6 → 2.7). After you have reached v2.7, you can upgrade directly to any v3.x and future release without performing each intermediate migration.
</Note>

### Steps to Migrate

This guide is for users who are self-hosting Formbricks using our one-click setup. If you are using a different setup, you might adjust the commands accordingly.

To run all these steps, please navigate to the `formbricks` folder where your `docker-compose.yml` file is located.

1. **Backup your Database**: This is a crucial step. Please make sure to backup your database before proceeding with the upgrade. You can use the following command to backup your database:

<Col>
<CodeGroup title="Backup Postgres">

```bash
docker exec formbricks-postgres-1 pg_dump -Fc -U postgres -d formbricks > formbricks_pre_v3.1_$(date +%Y%m%d_%H%M%S).dump
```

</CodeGroup>
</Col>

<Note>
If you run into “No such container”, use `docker ps` to find your container name, e.g. `formbricks_postgres_1`.
</Note>

<Note>
If you prefer storing the backup as an `*.sql` file remove the `-Fc` (custom format) option. In case of a restore scenario you will need to use `psql` then with an empty `formbricks` database.
</Note>

2. Pull the latest version of Formbricks:

<Col>
<CodeGroup title="Stop the containers">

```bash
docker compose pull
```

</CodeGroup>
</Col>

3. Stop the running Formbricks instance & remove the related containers:

<Col>
<CodeGroup title="Stop the containers">

```bash
docker compose down
```

</CodeGroup>
</Col>

4. Restarting the containers with the latest version of Formbricks:

<Col>
<CodeGroup title="Restart the containers">

```bash
docker compose up -d
```

</CodeGroup>
</Col>

When you start the latest version of Formbricks, it will automatically detect and run any necessary data migrations during startup. There is no need to run any manual migration steps or pull any separate migration images.

5. Access your updated instance

Once the containers are up and running, simply navigate to the same URL as before to access your fully migrated Formbricks instance.

That’s it! The new workflow ensures that your Formbricks instance will always remain up-to-date with the latest schema changes as soon as you run the updated container.

## v3.0

<Note>
Expand Down Expand Up @@ -89,9 +165,7 @@ When you start the latest version of Formbricks, it will automatically detect an

5. Access your updated instance

Once the containers are up and running, simply navigate to the same URL as before to access your fully migrated Formbricks instance.

That’s it! The new workflow ensures that your Formbricks instance will always remain up-to-date with the latest schema changes as soon as you run the updated container.
That’s it! Once the containers are up and running, simply navigate to the same URL as before to access your fully migrated Formbricks instance.

## v2.7

Expand Down
38 changes: 0 additions & 38 deletions packages/database/Dockerfile

This file was deleted.

0 comments on commit 21644f5

Please sign in to comment.