purge all data in railway postgres
o-az
HOBBYOP

a year ago

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

0 Replies

brody
EMPLOYEE

a year ago

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


o-az
HOBBYOP

a year ago

can volume be wiped programmatically or through cli?


brody
EMPLOYEE

a year ago

you can wipe it from the API yeah


o-az
HOBBYOP

a year ago

with cli no?


brody
EMPLOYEE

a year ago

the CLI doesn't offer that functionality afaik


o-az
HOBBYOP

a year ago

oof. I'm US based

1263015987775799300


o-az
HOBBYOP

a year ago

only auth'd no playground?


brody
EMPLOYEE

a year ago

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


o-az
HOBBYOP

a year ago

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


o-az
HOBBYOP

a year ago

instead of blocking you


brody
EMPLOYEE

a year ago

can you tell me your usecase please?


o-az
HOBBYOP

a year ago

graphiql


o-az
HOBBYOP

a year ago

example https://graphql.github.com/ redirects you to a playground if it's GET


brody
EMPLOYEE

a year ago

can you tell me your usecase?


brody
EMPLOYEE

a year ago


o-az
HOBBYOP

a year ago

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


o-az
HOBBYOP

a year ago

nice thanks


brody
EMPLOYEE

a year ago

i meant your usecase for wiping the volume


o-az
HOBBYOP

a year ago

oh sorry


o-az
HOBBYOP

a year ago

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


o-az
HOBBYOP

a year ago

I would not need that in production


brody
EMPLOYEE

a year ago

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


o-az
HOBBYOP

a year ago

i deploy a lot within my shell


o-az
HOBBYOP

a year ago

rarely use the dashboard


brody
EMPLOYEE

a year ago

gotcha


brody
EMPLOYEE

a year ago

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

o-az
HOBBYOP

a year ago

thanks


o-az
HOBBYOP

a year ago

can't find volume id


brody
EMPLOYEE

a year ago

open the volume and the id is in the url


o-az
HOBBYOP

a year ago

it worked and also

1263021666120765400


brody
EMPLOYEE

a year ago

yes, there is no wipe option


o-az
HOBBYOP

a year ago

so this just removes the volume entirely?


brody
EMPLOYEE

a year ago

yep


o-az
HOBBYOP

a year ago

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

1263022186642407400


brody
EMPLOYEE

a year ago

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


brody
EMPLOYEE

a year ago

but simply redeploy it


o-az
HOBBYOP

a year ago

argh I ran volumeDelete(volumeId: $volumeId) instead of volumeInstanceWipe


o-az
HOBBYOP

a year ago

but I don't see a volumeInstanceWipe in the schema


o-az
HOBBYOP

a year ago

1263022913033076700


brody
EMPLOYEE

a year ago

it doesnt need to be, use the internal endpoint


o-az
HOBBYOP

a year ago

that deleted the volume entirely instead of just clearing data


brody
EMPLOYEE

a year ago

yes, as you mentioned you called the wrong mutation


o-az
HOBBYOP

a year ago

i couldn't do this without you


Loading...