| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository provides a seamless way to automate backups of your Supabase database using GitHub Actions. It creates daily backups of your database’s roles, schema, and data, and stores them in your repository. It also includes a mechanism to easily restore your database in case something goes wrong.
Go to your repository settings and navigate to Actions > Variables. Add the following:
Secrets:
Variables:
The GitHub Actions workflow is triggered on:
The workflow performs the following steps:
To restore your database:
supabase db execute --db-url "<SUPABASE_DB_URL>" -f roles.sql
supabase db execute --db-url "<SUPABASE_DB_URL>" -f schema.sql
supabase db execute --db-url "<SUPABASE_DB_URL>" -f data.sqlThis restores roles, schema, and data, bringing your database back to its backed-up state. Workflow Toggle
Use the BACKUP_ENABLED variable to control whether backups are executed:
Set to true to enable backups. Set to false to skip backups without editing the workflow file.
A Supabase project with a PostgreSQL database. Supabase CLI installed for manual restoration. A GitHub repository with Actions enabled.
Contributions are welcome! If you have improvements or fixes, feel free to submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
| Back | FazBrowse Home | New Git URL |