Metabase Elastic Beanstalk - RDS Postgres Setting location on EC2

Hi,

I went thru this document and setup Metabase

I was trying to import our metabase backup from another server into this new server, and I did not see any metabase table on the RDS postgres server.

Does any one have any insight?

Thanks

Hi @Toga
Make sure you have backups.
Post “Diagnostic Info” from Admin > Troubleshooting from the old server. It sounds like it’s not even using RDS for the application database, which means it’s stored in H2 on the instance, which means it will be lost if you restart that instance.
You should keep the RDS separate/decoupled from the EBS - you might want to read these too:
Best practice for having RDS as part of EB environment
Elastic beanstalk app rebuild fail -> RDS restore 'backend' seems to work but can't acces http interface. any aws pro's want to freelance support?

Hi Flamber,

Our old metabase is non-aws, I am moving the non-aws backup into rds, but I am unable to find where the existing data is store, i figured it would be stored in RDS.

I will see if i can find it in the metabase server

@Toga I don’t understand. So you have manually dumped from local Postgres and loaded it into an RDS, but the data isn’t there?

I dump from a non-aws mysql sql server, but I have not imported it into the rds, as i am unable to find the new metabase tables.

@Toga Metabase doesn’t support EBS on MySQL RDS:
https://github.com/metabase/metabase/issues/9021 - upvote by clicking :+1: on the first post

the rds is postgres, I am asking where I should be able to locate the metabase database, on the rds postgres, or the ec2 local?

@Toga You cannot copy a MySQL schema to a Postgres schema without doing conversion.
It sounds like your question has nothing to do with Metabase, but is a general AWS question:
https://aws.amazon.com/premiumsupport/knowledge-center/rds-import-data/

ok thank you, but where is the actual metabase table located? in rds or on the local ec2?

@Toga I don’t understand what you’re asking. If you have followed the EBS guide, then the application database is setup on RDS.

Yes I have followed the setup guide:

However, when i am connected to the postgres rds, I see 3 databases:
+ebdb
+postgres
+rdsadmin

@Toga Post “Diagnostic Info” from Admin > Troubleshooting.

{

“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.8+10”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.8”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.8+10”,
“os.name”: “Linux”,
“os.version”: “4.14.192-147.314.amzn2.x86_64”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“mysql”
],
“hosting-env”: “elastic-beanstalk”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “12.3”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2020-08-17”,
“tag”: “v0.36.4”,
“branch”: “release-0.36.x”,
“hash”: “196c1f6”
},
“settings”: {
“report-timezone”: null
}
}
}

@Toga I don’t know. You must have multiple RDS running. Metabase will connect and create tables in the database.

i am not that great with docker, so this is a learning experience… i just found another article that pointed me towards docker inspect

        "Env": [
            "RDS_USERNAME=######",
            "RDS_DB_NAME=ebdb",
            "RDS_PASSWORD=##########",
            "RDS_PORT=5432",
            "RDS_HOSTNAME=########################.ca-central-1.rds.amazonaws.com",
            "PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LANG=en_US.UTF-8",
            "LANGUAGE=en_US:en",
            "LC_ALL=en_US.UTF-8",
            "JAVA_VERSION=jdk-11.0.8+10",
            "JAVA_HOME=/opt/java/openjdk",
            "FC_LANG=en-US",
            "LC_CTYPE=en_US.UTF-8"
        ],

so the db_name shows was configured as ebdb… i would like to find where the actual metabase settings are being stored. i think they are being stored in a local. i checked 4 of the elastic beanstalks i setup, and they all have the ebdb.

@Toga The Metabase data is stored in the configured application database - which is ebdb on RDS in your case.

so if i terminate the ec2, you are saying everything has been stored in ebdb…so it will be all repopulated

@Toga Yes, if the RDS is decoupled from the EBS, like I said in my first comment - Metabase Elastic Beanstalk - RDS Postgres Setting location on EC2

I finally found it, it was store under ebdb under a public schema, which was not being displayed.

found
metabase_database
metabase_field
metabase_fieldvalues
metabase_table