How to upload a encrypted data bag using knife

Hi am trying to create a chef server copying all files from an existing chef server. So when copied everything and ran a recipe it's getting error as data bag is encrypted. So, I downloaded keytab from an encrypted data bag on old chef server. Knife vault download keys sri_keytab sri.keytab Now I want to upload the data bag to my new chef server. I heard it's only possible in the case when we decrypt a data bag using vault and the keytab downloaded and then upload it as an encrypted one. But I don't know how So could anyone help me please......

Upvotes: 0

Views: 576

Answers (1)

ywainberg
ywainberg

Reputation: 15

You can do the following:

  • Decrypt a data bag from the old server
  • create a json file with the decrypted data
  • create a vault from the new json file to the new server

you can use this as reference chef-vault

Upvotes: 0

Related Questions