https://linen.dev logo
Is there a way to export database on shuttle's hos...
# help
b
I was wondering is there a way to export database tables so i can view it on my local pc?
a
Hey there, yes! You can just use
cargo shuttle resource list
for your project and it'll give you a conn string you can use to connect from your favourite db admin program
b
Im getting this error when trying to connect to db using pgadmin4, dont you know what might cause it?

https://cdn.discordapp.com/attachments/1096866592761061428/1096873158075748412/image.png

a
what pgadmin version are you using?
b
Im using pgAdmin4 7.0, i also tried version 6.21, but it gives me the same error
a
do you know what pgsql version you have installed locally?
b
i think i have version 15 installed
wait, do i need version 14.7 to connect to dbs that are running pgsql 14.7?
a
not sure tbh
i just connect via psql since i don't typically need any of the stuff that pgadmin offers at the moment (that, and I couldn't get pgadmin to work on linux... soooo yeah)
e
you need to specify the maintenance database as
postgres
to make it work, looks like
though
uh
doing that, I can see a lot more than i would expect, I don't think shuttle is locking down access permissions nearly enough by default 😬
ah, nope, nevermind. I can see a list of the databases, but I can't access any of them other than mine
a
ah yeah I don't think the shared db resource has been hardened enough to the point where you can only see your db - the aws-rds db is probably better in this regard
e
ok, scared me for a minute there
yeah, permissions are a bit weird, I get errors about something PgAdmin is wanting not being allowed, but if I go to the right DB I am able to find and view my own tables.
have to click through like five popups about missing permissions though, but it seems those are not critical
b
ty
e
would be nice if there was a way to only show the database(s) the user has access to at least view, idk how difficult that is on postgres
have to scroll through a (presumably) ever-expanding list at the moment to find the right one 😄
a
the postgres on the shared_db resource has been proving a bit problematic when it comes to hardening in this regard - historically, it's been recommended to use the aws-rds resource as it's basically the same but you can only see your own stuff
e
hm
ngl I mainly picked postgres as it was the first / easiest thing I found to add in for storage 😂