#purge all data in railway postgres

45 messages · Page 1 of 1 (latest)

slate shale
#

is there an eazy way to do this? I want to be able to clear up the database easily and also disable backups

serene cometBOT
#

Project ID: N/A

grizzled oak
#

wipe the volume from within the volume setting, additionally railway does not take any backups for you in any way

slate shale
#

can volume be wiped programmatically or through cli?

grizzled oak
#

you can wipe it from the API yeah

slate shale
#

with cli no?

grizzled oak
#

the CLI doesn't offer that functionality afaik

slate shale
#

oof. I'm US based

#

only auth'd no playground?

grizzled oak
#

that's okay because that's not how the API works

slate shale
#

well most graphql apis take you to a playground if it's a GET request

#

instead of blocking you

grizzled oak
#

can you tell me your usecase please?

slate shale
#

graphiql

grizzled oak
#

can you tell me your usecase?

slate shale
#

i want to explore the schema so I can construct the necessary query in order to wipe volume

#

nice thanks

grizzled oak
#

i meant your usecase for wiping the volume

slate shale
#

oh sorry

#

I'm creating railway deployment guide then a template for this https://github.com/joshstevens19/rindexer

while developing that I find myself deploying frequently and needing a fresh database. Basically to make sure indexing and db sync is working

#

I would not need that in production

grizzled oak
#

if its just for development, why not just click wipe volume in the volume settings?

slate shale
#

i deploy a lot within my shell

#

rarely use the dashboard

grizzled oak
#

gotcha

#
mutation volumeInstanceWipe($volumeInstanceId: String!) {
  volumeInstanceWipe(volumeInstanceId: $volumeInstanceId)
}
{
  "volumeInstanceId": "id_here"
}
slate shale
#

thanks

#

can't find volume id

grizzled oak
#

open the volume and the id is in the url

grizzled oak
#

yes, there is no wipe option

slate shale
#

so this just removes the volume entirely?

grizzled oak
#

yep

slate shale
#

silly question, now that I wiped the volume it removed the deployment. Understandable. What do to create a new deployment?

grizzled oak
#

it should not remove the deployment, I just tried it and it redeployed

#

but simply redeploy it

slate shale
#

but I don't see a volumeInstanceWipe in the schema

grizzled oak
#

it doesnt need to be, use the internal endpoint

slate shale
#

that deleted the volume entirely instead of just clearing data

grizzled oak
#

yes, as you mentioned you called the wrong mutation

slate shale
#

i couldn't do this without you