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