mdxp / knife-backup

knife plugin to help backup and restore a chef server.
Apache License 2.0
110 stars 45 forks source link

Getting error on backing up the chef server using knife #26

Closed tarungarg closed 9 years ago

tarungarg commented 10 years ago

This is on Ubuntu machine.

  1. I installed gem on chef server for backup the server.
    sudo gem install knife-backup
  1. 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://server_ip'

  2. 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

tyrken commented 10 years ago

You don't have a "client_key" setting (which I think defaults to client.pem), which you can get via running "knife configure" (which will re-ask you for some of the info in the file above) or via the server GUI generating a user account with private key, that you'd save locally & configure as the client_key.

pmoosh commented 9 years ago

Closing this a configuration issue.

thanks @tyrken