How do I update Metabase running on Elastic BeanStalk?


#1

How do we pull the latest version if we are running on Elastic BeanStalk? Can I ssh into the main instance and run a command?


#2

Hey Justin,

If you head over to our docs about running Metabase on AWS there is actually a section lower down on the page about upgrading …

We could probably make that a bit more visible somehow, but in any case the content is there. Short version is that you just need to download the latest EB version file from us and upload that as a new app version in EB. Takes a minute or so to do.


#3

Bad Idea!

If you just deployed using the local h2 store as database you lose everything you’ve done configuring you’re previous version metabase.

The correct way is to login into the host, copy the metabase.db.h2.db from the running container, update the version and the upload the metabase.db.h2.db again.

The first time i did it from 0.10 to 0.12 and worked.

I just tried updating the application version and losed all the configs going from 0.12.1 to 0.14.1


#4

If you’re using Elastic Beanstalk, your application database should be on RDS if you’ve followed http://www.metabase.com/start/aws.html

Not sure how you ended up using the embedded DB on beanstalk, but you should probably avoid that on Beanstalk/EC2 in general, unless you’re using an EBS backed instance.


#5

bah - Just updated my Elastic BeanStalk instance and lost all configuration/reports/manual queries painstakingly created moving from .13 to .15. Is there anyway to get this information back?


#6

were you using RDS to store application data? If so you should be able to recover a snapshot


#7

negative - it errored when I added that to the initial config, so I didn’t add it on the next go-around. Is there a way to import the settings, or will you have to re-build everything with all updates?


#8

Adam, say it ain’t so! :sob:

The reason RDS is highly recommended as the application database is specifically for this reason. The local embedded database has no way of being persisted and backed up easily in a cloud environment like AWS, so if the server ever goes down for any reason then the data is lost.

I wish I had better news, but in this case you’ll have to start fresh and rebuild everything.


#9

This link is dead… help?


#10

Good catch… Try now.


#11

can anybody help me with this Deploy Metabase without Elastic Beanstalk


#12

Where can the metabase.db.h2.db file be found? I am running metabase without RDS and want to upgrade. I set up ssh access but do not find the file anywhere there.


#13

It is in the directory where the metabase jar is being run. I believe it should be under /app/ if you’re using our docker file.


#14

I figured it out on my own, forgot to update. Indeed its in the docker:

sudo docker cp sharp_feynman:metabase.db.mv.db .
sudo docker cp sharp_feynman:metabase.db.trace.db .
sudo docker cp sharp_feynman:metabase.db.lock.db .


#15

I tried following these instructions to deploy a new version of Metabase to Elastic Beanstalk (http://www.metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html#deploying-new-versions-of-metabase) and received the following error:

DB is not setup. Make sure to bind call set-default-db-connection! or bind *db-connection*.

I was able to revert to the previous version, however I’m not sure how to proceed. can anyone point me in the right direction?


Version 0.23: public charts and dashboards, as well as app embedding
#16

That’s unfortunately what we currently display when you run a health check before the instance is fully set up.
If you wait a minute or two, the upgrade should go through.

We’re going to improve that message –


#17

@sameer thanks - that did the trick!


#18

For those using metabase without a DB, we created a python fabric script that can backup and restore a metabase configuration on EBS.

https://pastebin.com/MCENQFHr


#19

Would any kind souls here be willing to share the aws cli instructions for linking a prior RDS snapshot to a new elastic beanstalk environment?

From my understanding the steps are
#1 - Make sure you have a snapshot!
#2 aws rds delete --db-instance-identifier <value>
#3 aws rds restore-db-instance-from-db-snapshot --db-instance-identifier <value> --db-snapshot-identifier <value>

at this poing the db should be restored but I simply cannot get the Metabase EB environment to connect to the new db. Restarting the instance seems to crash everything, rebuilding environment makes a new RDS where the process would need to be repeated. Any assistance would be very helpful. I feel as if I’m simply missing a final step to force a db connection.