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