Skip to content

Instantly share code, notes, and snippets.

@atomic-penguin
Created December 8, 2010 19:04
Show Gist options
  • Save atomic-penguin/733724 to your computer and use it in GitHub Desktop.
Save atomic-penguin/733724 to your computer and use it in GitHub Desktop.
couchdb_compact
#!/bin/sh
COUCHDB_URI="http://localhost:5984/chef"
curl -H "Content-Type: application/json" -X POST $COUCHDB_URI/_compact >/dev/null 2>&1
for i in users sandboxes roles nodes id_map data_bags cookbooks clients checksums; do
curl -H "Content-Type: application/json" -X POST $COUCHDB_URI/_compact/$i >/dev/null 2>&1;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment