Need advice on migrating to new self-hosted Retool infrastructure, and also questions about externalizing the database

Hello Retool, I have a project to migrate a self-hosted Retool to a new set of infrastructure. I have a requirement to migrate the existing data and make the transition as seamless as possible.

CURRENT SETUP

  • One EC2 instance. docker-compose is hosting the database. :scream:

NEW SETUP

  • One EC2 instance with docker-compose
  • The database will be hosted on RDS Aurora Serverless V2, PostgreSQL 13.7

MY QUESTIONS

  1. Is there a complete guide for this type of project? I am not understand the multiple databases. I see references to "The Retool Database" and "The Storage Database"
  2. My current dockerized postgres container has 3 databases, all with randomized names. It makes it very difficult to understand what is going on here.
  3. FYI I am following this guide: Configure and migrate to an external database | Retool Docs

List of databases on my postgres container

postgres=# \l
                                                                                List of databases
               Name               |              Owner               | Encoding |  Collate   |   Ctype    |                           Access privileges                          
 
----------------------------------+----------------------------------+----------+------------+------------+----------------------------------------------------------------------
-
 2605b4686cdd4a60b674a31ccc6d4596 | 2605b4686cdd4a60b674a31ccc6d4596 | UTF8     | en_US.utf8 | en_US.utf8 | 2605b4686cdd4a60b674a31ccc6d4596=CTc/2605b4686cdd4a60b674a31ccc6d4596
 27a406483aee4a61ba907e62fbf2108b | 27a406483aee4a61ba907e62fbf2108b | UTF8     | en_US.utf8 | en_US.utf8 | 27a406483aee4a61ba907e62fbf2108b=CTc/27a406483aee4a61ba907e62fbf2108b
 c01959fbaf794013a0f5a52c00cb968f | c01959fbaf794013a0f5a52c00cb968f | UTF8     | en_US.utf8 | en_US.utf8 | c01959fbaf794013a0f5a52c00cb968f=CTc/c01959fbaf794013a0f5a52c00cb968f
 postgres                         | root                             | UTF8     | en_US.utf8 | en_US.utf8 | 
 template0                        | root                             | UTF8     | en_US.utf8 | en_US.utf8 | =c/root                                                              
+
                                  |                                  |          |            |            | root=CTc/root
 template1                        | root                             | UTF8     | en_US.utf8 | en_US.utf8 | =c/root                                                              
+
                                  |                                  |          |            |            | root=CTc/root
(6 rows)

I don't think I can edit the original post. I want to add some info:

  1. Old/current install is running 3.24.1, without Temporal
  2. New install is also running 3.24.1, it is a totally fresh install, but I enabled Temporal

This topic can be closed. This is resolved. If anyone stumbles on this in the future:

  1. pg_dump the hammerhead_production schema
  2. create database hammerhead_production; on the psql console
  3. Import it to the new RDS instance
  4. That's it, don't worry about any other databases. Technically it also needs the postgres database but RDS creates that automatically for you, and it's OK that it is empty

Then your docker.env should look like this:

## Set and generate postgres credentials
POSTGRES_DB=hammerhead_production
POSTGRES_USER=<THE RDS ADMIN USERNAME>
POSTGRES_HOST=<THE RDS HOSTNAME>
POSTGRES_PORT=5432
POSTGRES_PASSWORD=<THE RDS ADMIN PASSWORD>

## Set and generate retooldb postgres credentials
RETOOLDB_POSTGRES_DB=postgres
RETOOLDB_POSTGRES_USER=<THE RDS ADMIN USERNAME>
RETOOLDB_POSTGRES_HOST=<THE RDS HOSTNAME>
RETOOLDB_POSTGRES_PORT=5432
RETOOLDB_POSTGRES_PASSWORD=<THE RDS ADMIN PASSWORD>