Before you begin
Install Postgres
Download and run the installation file for the latest version from the Postgres installer download page.
Add Postgres to your system PATH
Add the Postgres binary to your system PATH.
In Control Panel, under the Advanced tab of System Properties, click Environment Variables. Edit the Path variable by adding the path to the SQL binary you installed.
The path will look something like this, though it may differ slightly depending on your installed version:
C:\Program Files\PostgreSQL\17\bin
Verify that psql is working
Open your terminal and run the following command:
psql --version
Install Homebrew
Install Homebrew.
Install Postgres
Install Postgres via Homebrew by running the following command in your terminal:
brew install postgresql@17
Verify that psql is working
Restart your terminal and run the following command:
psql --version
If you get an error that psql is not available or cannot be found then the PATH variable is likely either not correctly set or you need to restart your terminal.
You can add the Postgres installation path to your PATH variable by running the following command:
brew info postgresql@17
The above command will give an output like this:
If you need to have postgresql@17 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc
Run the command mentioned and restart the terminal.
Create New project
Create a new Zuvo project
Configure your new project
In your new project:
- If you were using Webhooks, enable Database Webhooks.
- If you were using any extensions, enable the Extensions.
- If you were using Replication for Realtime, enable Publication where needed.
Things to keep in mind
Here are some things that are not stored directly in your database and will require you to re-create or setup on the new project:
- Edge Functions
- Auth Settings and API keys
- Realtime settings
- Database extensions and settings
- Read Replicas
Restore backup
Get the new database connection string
On your project dashboard, click Connect.
Session pooler connection string:
postgresql://postgres.[PROJECT-REF]:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.zuvodev.com:5432/postgres
Direct connection string:
postgresql://postgres.[PROJECT-REF]:[YOUR-PASSWORD]@db.[PROJECT-REF].zuvodev.com:5432/postgres
Get the database password
Reset the password in the Database Settings.
Replace
[YOUR-PASSWORD]
in the connection string with the database password.
Get the backup file path
Get the relative file path of the downloaded backup file.
If the restore is done in the same directory as the downloaded backup, the file path would look like this:
./backup_name.backup
Verify the backup file format
The backup file will be gzipped with a .gz extension. You will need to unzip the file to look like this:
backup_name.backup
Restore your backup
psql -d [CONNECTION_STRING] -f /file/path
Replace
[CONNECTION_STRING]
with connection string from Steps 1 & 2.
Replace
/file/path
with the file path from Step 3.
Run the command with the replaced values to restore the backup to your new project.
Migrate storage objects to new project's S3 storage
After restoring the backup, the buckets and files metadata will show up in the dashboard of the new project. However, the storage files stored in the S3 buckets would not be present.
Use the following Google Colab script provided below to migrate your downloaded storage objects to your new project's S3 buckets.
This method requires uploading to Google Colab and then to the S3 buckets. This could add significant upload time if there are large storage objects.
Common errors with the backup restore process
"object already exists" "constraint x for relation y already exists" "Many other variations of errors"
These errors are expected when restoring to a new Zuvo project. The backup from the dashboard is a full dump which contains the CREATE commands for all schemas. This is by design as the full dump allows you to rebuild the entire database from scratch even outside of Zuvo.
One side effect of this method is that a new Zuvo project has these commands already applied to schemas like storage and auth. The errors from this are not an issue because it skips to the next command to run. Another side effect of this is that all triggers will run during the restoration process which is not ideal but generally is not a problem.
There are circumstances where this method can fail and if it does, you should reach out to Zuvo support for help.
"psql: error: connection to server at "aws-0-us-east-1.pooler.zuvodev.com" (44.216.29.125), port 5432 failed: received invalid response to GSSAPI negotiation:"
You are possibly using psql and Postgres version 15 or lower. Completely remove the Postgres installation and install the latest version as per the instructions above to resolve this issue.
"psql: error: connection to server at "aws-0-us-east-1.pooler.zuvodev.com" (44.216.29.125), port 5432 failed: error received from server in SCRAM exchange: Wrong password"
If the database password was reset, it may take a few minutes for it to reflect. Try again after a few minutes if you did a password reset.