This is on Ubuntu machine. I installed knife backup gem on chef server for backup the server.
sudo gem install knife-backup
Now I create a knife.rb file the following configuration.
log_level :info
log_location STDOUT
validation_client_name 'chef-validator'
validation_key '/etc/chef-server/chef-validator.pem'
chef_server_url 'https://ip'
When I run the following command,
sudo knife backup export -D /etc/chef/backups -c knife.rb
it is showing me error:-
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: character class has [' without escape /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: regexp has]' without escape
Backing up clients
ERROR: Your private key could not be loaded from /etc/chef/client.pem
Check your configuration file and ensure that your private key is readable
I have solved this using the below command. This is admin task and we need to describe user and admin key for the same.
sudo knife backup export -D /etc/chef/backups --user admin --key /etc/chef-server/admin.pem -c knife.rb
Please give me some more solutions for the same and better description
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With