The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
render-migration-guide
Rodrigo Mansueli Nunes5c2eb8394bc6
diff --git a/apps/docs/components/Clippy/ClippyModal.tsx b/apps/docs/components/Clippy/ClippyModal.tsxindex 3bbbd7c69de..4bdf1341cef 100644--- a/apps/docs/components/Clippy/ClippyModal.tsx+++ b/apps/docs/components/Clippy/ClippyModal.tsx@@ -34,7 +34,7 @@ const questions = []function getEdgeFunctionUrl() {- const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL.replace(/\/$/, '')+ const supabaseUrl = 'http://localhost:3001/'//process.env.NEXT_PUBLIC_SUPABASE_URL.replace(/\/$/, '')const isPlatform = supabaseUrl.match(/(supabase\.co)|(supabase\.in)/)if (isPlatform) {diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex e8992e91e42..a8656ae4d8f 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -657,6 +657,11 @@ export const resources = {url: '/guides/resources/migrating-to-supabase/heroku',items: [],},+ {+ name: 'Render',+ url: '/guides/resources/migrating-to-supabase/render',+ items: [],+ },],},{@@ -719,6 +724,7 @@ export const migrate = {{ name: 'Firestore Data', url: '/guides/migrations/firestore-data', items: [] },{ name: 'Firebase Storage', url: '/guides/migrations/firebase-storage', items: [] },{ name: 'Heroku', url: '/guides/migrations/heroku', items: [] },+ { name: 'Render', url: '/guides/migrations/render', items: [] },],}diff --git a/apps/docs/pages/guides/resources.mdx b/apps/docs/pages/guides/resources.mdxindex c85f5447d3c..c5242d1aef4 100644--- a/apps/docs/pages/guides/resources.mdx+++ b/apps/docs/pages/guides/resources.mdx@@ -135,6 +135,12 @@ export const migrationGuides = [href: '/guides/resources/migrating-to-supabase/heroku',description: 'Migrate your Heroku Postgres database to Supabase.',},+ {+ title: 'Render',+ icon: '/docs/img/icons/render-icon',+ href: '/guides/resources/migrating-to-supabase/render',+ description: 'Migrate your Render Postgres database to Supabase.',+ },]export const postgres = [diff --git a/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdxnew file mode 100644index 00000000000..e5878a9edb6--- /dev/null+++ b/apps/docs/pages/guides/resources/migrating-to-supabase/render.mdx@@ -0,0 +1,70 @@+import Layout from '~/layouts/DefaultGuideLayout'++export const meta = {+ id: 'Render',+ title: 'Migrate from Render to Supabase',+ description: 'Migrate your Render Postgres database to Supabase.',+ sidebar_label: 'Render',+}++Supabase is a top\-notch, free alternative to Render Postgres. In this guide, we will walk you through how to transfer your Render Postgres database to Supabase.+You will need to use the [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html) and [psql](https://www.postgresql.org/docs/current/app-psql.html) command line tools, which come included in a full PostgreSQL installation.+If you prefer a quicker option, try the Supabase migration tool on [Google Colab](https://colab.research.google.com/github/mansueli/Supa-Migrate/blob/main/Migrate_Postgres_Supabase.ipynb) for a simple, few-click migration.++## Retrieve your Render database credentials [#retrieve-render-credentials]++1. Log in to your [Render account](https://render.com) and select the project you want to migrate.+1. Click **Dashboard** in the menu and click in your **Postgres** database.+1. Scroll down in the **Info** tab.+1. Click on **PSQL Command** and edit it adding the content after `PSQL_COMMAND=`.+++Example:++```bash+%env PSQL_COMMAND=PGPASSWORD=RgaMDfTS_password_FTPa7 psql -h dpg-a_server_in.oregon-postgres.render.com -U my_db_pxl0_user my_db_pxl0+```++## Retrieve your Supabase Host [#retrieve-supabase-host]++1. If you're new to Supabase, [create a project](https://app.supabase.com).+1. Go to the [Database settings](https://app.supabase.com/project/_/settings/database) for your project in the Supabase Dashboard.+1. Under **Connection Info**, note your Host (`$SUPABASE_HOST`).+1. Save your password or [reset it](https://app.supabase.com/project/_/settings/database) if you forgot it.++++## Run the migration in Colab [#run-migration]++1. Set the environment variables (`PSQL_COMMAND`, `SUPABASE_HOST`, `SUPABASE_PASSWORD`) in the Colab notebook.+1. Run the first two steps in [the notebook](https://colab.research.google.com/github/mansueli/Supa-Migrate/blob/main/Migrate_Postgres_Supabase.ipynb) in order. The first sets the variables and the second installs PSQL and the migration script.+1. Run the third step to start the migration. This will take a few minutes.++## Export your Render database to a file in console [#export-render-database]+Use `pg_dump` with your Render credentials to export your Heroku database to a file (e.g., `render_dump.sql`).++```bash+pg_dump --clean --if-exists --quote-all-identifiers \+ -h $RENDER_HOST -U $RENDER_USER -d $RENDER_DATABASE \+ --no-owner --no-privileges > render_dump.sql+```++## Import the database to your Supabase project [#import-database-to-supabase]++Use `psql` to import the Heroku database file to your Supabase project.++```bash+psql -h $SUPA_URL -U postgres --file render_dump.sql -p 6543 -d postgres+```++## Additional options+- To only migrate a single database schema, add the `--schema=PATTERN` parameter to your `pg_dump` command.+- To exclude a schema: `--exclude-schema=PATTERN`.+- To only migrate a single table: `--table=PATTERN`.+- To exclude a table: `--exclude-table=PATTERN`.++Run `pg_dump --help` for a full list of options.++export const Page = ({ children }) => <Layout meta={meta} children={children} />++export default Pagediff --git a/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.png b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.pngnew file mode 100644index 00000000000..1645901dc23Binary files /dev/null and b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/render_dashboard.png differdiff --git a/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.pngnew file mode 100644index 00000000000..3a1ff5b9dafBinary files /dev/null and b/apps/docs/public/img/guides/resources/migrating-to-supabase/render/supabase_dashboard.png differdiff --git a/apps/docs/public/img/icons/render_logo.svg b/apps/docs/public/img/icons/render_logo.svgnew file mode 100644index 00000000000..49e41abdba4--- /dev/null+++ b/apps/docs/public/img/icons/render_logo.svg@@ -0,0 +1,13 @@+<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">+<rect x="17.4653" y="17.6948" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="13.1709" y="17.6948" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="13.1709" y="0.828125" width="2.81974" height="2.81974" fill="#46E7AA"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M0.285156 7.2979C0.285156 3.72312 3.18309 0.825195 6.75786 0.825195H11.6109V3.65042H6.75786C4.74341 3.65042 3.11038 5.28345 3.11038 7.2979V16.259H0.285156V7.2979Z" fill="#46E7AA"/>+<rect x="8.87671" y="17.6948" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="4.58228" y="17.6948" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="0.288086" y="17.6948" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="17.4653" y="13.478" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="17.4653" y="9.26123" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="17.4653" y="5.04492" width="2.81974" height="2.81974" fill="#46E7AA"/>+<rect x="17.4653" y="0.828125" width="2.81974" height="2.81974" fill="#46E7AA"/>+</svg>diff --git a/package-lock.json b/package-lock.jsonindex 78869d57003..244acf7bbcf 100644--- a/package-lock.json+++ b/package-lock.json@@ -46181,7 +46181,7 @@"@sinclair/typebox": "^0.25.1","pg": "^8.7.1","pg-format": "^1.0.4",- "pgsql-parser": "^13.3.0",+ "pgsql-parser": "13.4.0","postgres-array": "^3.0.1","prettier": "^2.6.0","prettier-plugin-sql": "^0.12.1"