Download entire databag?


i am using data bags in such a way that an “admin” server creates about
3500 data bag items in a specific, then on each chef run verifies the
contents and deletes or adds missing or extra items.

i realize this is not the same way others would do it, but it is how i do

what i’m wondering:

is there a way to download the entire data bag, rather than fetching each
item one by one? it works out to 3500 round trips, which adds up to a very
long chef run…


You can use search. search(:mydatabag, “:”)

Hmm. This could work. Back in the once upon a time that failed because
there was one big data bag item instead of 3500 tiny ones, and no matter
how the config was changed, solr refused to index it.

I'd prefer a direct call instead of a search, but this could work.

Could even use partial search when a node needs one attribute from each of
1800 of those. Hmm :slight_smile:
On Mar 12, 2013 6:36 PM, "Brian Akins" wrote:

You can use search. search(:mydatabag, ":")