diff --git a/knowledge base/dblab.md b/knowledge base/dblab.md index 7072b74..b5e309c 100644 --- a/knowledge base/dblab.md +++ b/knowledge base/dblab.md @@ -56,6 +56,9 @@ dblab config switch 'prod' # Fetch the status of the Engine's instance. dblab instance status +# Get the ID of the latest snapshot. +dblab snapshot list | jq -r 'max_by(.createdAt).id' + # Create clones. dblab clone create --username 'dblab_user_1' --password 'secret_password' --id 'my_first_clone' curl -X 'POST' 'https://dblab.instance.fqdn/api/clone' -H 'Verification-Token: verification-token-here' \ diff --git a/snippets/dblab.fish b/snippets/dblab.fish index a525075..b75589b 100644 --- a/snippets/dblab.fish +++ b/snippets/dblab.fish @@ -63,6 +63,9 @@ dblab snapshot list curl 'https://dblab.example.org:2345/snapshots' -H "Verification-Token: $(gopass show -o 'dblab')" curl 'https://dblab.example.org:1234/api/snapshots' -H "Verification-Token: $(gopass show -o 'dblab')" +# Get the ID of the latest snapshot. +dblab snapshot list | jq -r 'max_by(.createdAt).id' + # Create clones dblab clone create --id 'some-clone' --protected --username 'geppetto' --password 'pinocchio' --db-name 'puppetshop' curl -X 'POST' 'https://dblab.example.org:1234/api/clone' -H "Verification-Token: $(gopass show -o 'dblab')" \