Migrate Umami to Railway
I need some help to migrate umami from pikapods to railway @Brody
122 Replies
Project ID:
N/A
N/A
👋
you have access to adminer on pikapods, so export the database from there, and then we will go from there
Posted on umami server
I don't know where that dump function is
If this function exist it should be easier
within umami's ui?
No idea
That's all I was told
dig around in it
i cant find anything, i think they meant database dump/restore
GitHub
Data Export and Import · umami-software umami · Discussion #2159
Data Export and Import At present, my umami is running on a server through docker. I want to migrate it to vercel + supabase, but I have not found the function of data import and export. If there i...
yeah where gonna have to do a database export and import
Ok
What do I choose here?
so export the database from adminer
This is it
Use/drop+create/create?
yeah why not
its an export, its not like you can break stuff, if you do you just deploy a new umami template
I used the create option
In the file it says it's a dump
this is what i used
Ok, done
you got your gzip file in hand?
yep
okay deploy that umami template i linked you, or do you want me to send it again?
is it not just one?
Ok
the one in your screenshot deploys with postgres, we dont want that
It asks me to config things
yeah just click config and save
REady
okay let me get caught up, im doing this all myself too
Ok, I guess let's continue on Monday, I think my brain is dead for today and tomorrow I don't want to use the computer.
fair enough
Talk on Monday
sounds good
Hola
Back to business
How was your weekend?
just woke up, still only on phone for now, but where did we leave off?
you had your database dump gzip file from adminer and now you have a new umami deploy on railway right?
Yes, I think I will do another dump just before I'm ready to import to make sure I have all the data
But yeah, I'm ready for the next step 🙂
yeah that makes sense, good idea
in preparation for this I have created a Adminer template for railway, go ahead and deploy that into your current project
Done
and now I'd like to not be on a phone for the next steps, I should be on my computer in under 20 minutes, talk soon
ok
Let me know
we back
Cool I'm here
we want to remove umami's active deployment
Sorry I went to lunch break
no worries
Done
perfect, open adminer and login to the mysql database
Server -> mysql.railway.internal:3306
Username ->
MYSQLUSER
Password -> MYSQLPASSWORD
Database -> MYSQLDATABASE
you would need to use the values of those environment variables
and where are those?
in the variables tab on the mysql service
ah yeah
I'm in
click import
import, top left
yes
then choose your gzip dump, and click execute
okay now you can go back to the railway database (in adminer) and send a screenshot
how many websites did you have in umami on pikapods
1
yours says zero, but click it anyway
might have done the export from pikapods wrong, show me the settings you used to do that export please
what is the size of your gziped file?
Just downloaded again and see I ripped the filename off of .sql
This is newly downloaded one
try to import that into the railway database again
Don't we need to clean the database off of the first import first?
shouldn't need to
ok
Negative
show me the same thing in adminer for pikapods
would you be interested in sending me that gzip file? (in dms)
Done
looking
okay, i think i see whats happening, within railway's adminer
select p16699 from the DB dropdown in the top left
then once selected on that database, do this
then you can select the railway database again then check if the data is all there
That was it
sweet, log out of adminer, then go and redeploy umami
Shouldn't we deleted the Database: p16699 ?
sure you can drop the tables in there
Done
log into umami
same username and password you used on the pikapods umami app
I'm in Sir
everything look good?
Yep
Is it the same tracking code or do I have to change it?
awsome
tracking code should be the same, and i assume you plan on bringing over your custom domain too, so you really shouldnt need to change any site code if my understanding is correct (i could be wrong)
Ok
Only difference I see is where the js code sits
<script async src="https://umami-production-9cc6.up.railway.app/script.js" data-website-id="08d74cce-a55f-410d-a294-15433f5a1f93"></script>
now it sits on railway
So I just rapleced the tracking code
the tracking code changed?
just this: src="https://umami-production-9cc6.up.railway.app/script.js"
data-website-id="08d74cce-a55f-410d-a294-15433f5a1f93" is the same
you arent going to use a custom domain for that?
Yes
alright then you can just change it back when you do that
ok
Thank you!
Will be back in about an hour
can i mark this as solved?
Yes
I'm not getting hits
Since I changed the tracking code
are there any console errors when you visit a site that reports to umami?
Not sure what you mean
well when you visit your website that you have reporting to umami, are you seeing any console errors?
where would I see that?
in the browsers console logs (dev tools)
Barnaby Nagy
Barnaby Nagy
Barnaby Nagy is an Artist, Singer-Songwriter, Public Speaker, Author, Mentor, Hustler, Survivor - Barnabas Nagy
i am seeing data being sent to umami
Me too
maybe the website id did change?
It recorded your visit
Perhaps there was just no one visiting haha
well problem solved
all good with umami now?
Yes sir
All good
Thank you!!!