Skip to content

Instantly share code, notes, and snippets.

@saswata-dutta
Created February 23, 2021 10:47
Show Gist options
  • Save saswata-dutta/38a205ace4b814f4411cd73645d39c84 to your computer and use it in GitHub Desktop.
Save saswata-dutta/38a205ace4b814f4411cd73645d39c84 to your computer and use it in GitHub Desktop.
Reset Neptune Data
#!/bin/bash
echo 'Dropping DB'
_tok=`curl -X POST -H 'Content-Type: application/json' \
https://neptuneinstance-???.???.us-east-1.neptune.amazonaws.com:8182/system \
-d '{ "action" : "initiateDatabaseReset" }' | grep token |awk '{print $3}'`
echo $_tok
curl -X POST -H 'Content-Type: application/json' https://neptuneinstance-???.???.us-east-1.neptune.amazonaws.com:8182/system \
-d '{ "action" : "performDatabaseReset","token" ':$_tok'}'
echo 'waiting 10 seconds'
sleep 10
# check status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment