Created
February 23, 2021 10:47
-
-
Save saswata-dutta/38a205ace4b814f4411cd73645d39c84 to your computer and use it in GitHub Desktop.
Reset Neptune Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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