purge all data in railway postgres
is there an eazy way to do this? I want to be able to clear up the database easily and also disable backups
34 Replies
Project ID:
N/A
wipe the volume from within the volume setting, additionally railway does not take any backups for you in any way
can volume be wiped programmatically or through cli?
you can wipe it from the API yeah
with cli no?
the CLI doesn't offer that functionality afaik
oof. I'm US based
only auth'd no playground?
that's okay because that's not how the API works
well most graphql apis take you to a playground if it's a GET request
instead of blocking you
can you tell me your usecase please?
can you tell me your usecase?
https://railway.app/graphiql
i want to explore the schema so I can construct the necessary query in order to wipe volume
nice thanks
i meant your usecase for wiping the volume
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
if its just for development, why not just click wipe volume in the volume settings?
i deploy a lot within my shell
rarely use the dashboard
Solution
gotcha
thanks
can't find volume id
open the volume and the id is in the url
it worked and also
yes, there is no wipe option
so this just removes the volume entirely?
yep
silly question, now that I wiped the volume it removed the deployment. Understandable. What do to create a new deployment?
it should not remove the deployment, I just tried it and it redeployed
but simply redeploy it
argh I ran
volumeDelete(volumeId: $volumeId)
instead of volumeInstanceWipe
but I don't see a volumeInstanceWipe
in the schemait doesnt need to be, use the internal endpoint
that deleted the volume entirely instead of just clearing data
yes, as you mentioned you called the wrong mutation
i couldn't do this without you