How Can I Move All Versions of All Cookbooks To Another Org?

Sean Horn -

Summary: If you would like to download more than just the latest version of all cookbooks in a chef server org and upload the same to another org.

In the knife config reference found at, you can find an entry about "versioned_cookbooks".

  • If you modify your knife.rb like this, "knife download cookbooks" will retrieve all the versions of all cookbooks present in whatever org your knife.rb currently references and place them under the "cookbooks" directory in the chefrepo where you are running knife.

         versioned_cookbooks true

  • Once the above is set in your knife.rb, run. 

         knife download cookbooks

  • If you then change your knife.rb to point at another org, you can upload from the same chefrepo with

         knife upload cookbooks

Note: You may need to add the option "--chef-repo-path" to the knife commands to point at whatever directory you are in if you don't usually keep a chefrepo.

Have more questions? Submit a request


Powered by Zendesk