You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shuttle Postgres databases run Postgres version 16, so `psql` versions older than 16 might not work.
24
23
</Warning>
25
24
26
-
{/*
27
-
## 1. Deploy and provision Shared Postgres on shuttle.dev
28
-
29
-
Follow [Platform Migration](/platform-update/migration) to deploy your app to **shuttle.dev**, including the provisioning of the database resource.
30
-
31
-
If you want the restore step to restore both the schema and data, you can temporarily disable migration logic in your app during this phase.
32
-
33
-
## 2. Upgrade container on shuttle.rs and Shuttle CLI
34
-
35
-
To use the dump command, your deployer and CLI need to be v0.52.0 or higher.
36
-
37
-
Upgrade the CLI by following the [upgrading guide](/guides/upgrade).
38
-
39
-
Restarting the project will upgrade the deployer to the latest version:
40
-
41
-
```sh
42
-
cargo shuttle project restart
43
-
```
44
-
45
-
## 3. (Optional) Stop running service on shuttle.rs
46
-
47
-
If your app is frequently writing to the tables, and you don't want data to go missing after the migration, it is recommended to stop the current deployment while you perform the database maintenance.
48
-
49
-
```sh
50
-
cargo shuttle stop
51
-
```
52
-
53
-
<Info>
54
-
If you for any reason need to cancel the migration and start the service, do so by deploying again.
55
-
</Info>
56
-
57
-
## 4. Dump data from shuttle.rs
25
+
## Dump database to SQL file
58
26
59
27
Since the Shared Postgres cluster has strict permissions, running `pg_dump` against your connection string is not possible.
60
28
Instead, you can use the `resource dump` command that runs `pg_dump` with `--no-owner --no-privileges` for you.
@@ -67,16 +35,15 @@ The command writes a dump in SQL format to stdout, so you can use it to write to
The max size for the dump is 50 MB. If you get errors about request limits, reach out to us.
42
+
If you get errors about request limits or timeouts, reach out to us for support.
75
43
</Note>
76
44
77
45
You can inspect the file and edit it to your liking.
78
46
If you already let your schema migrations run in the new db, you could for instance remove the `CREATE TABLE`, `ALTER TABLE` etc, and only keep the table data `COPY` statements and so on.
0 commit comments