Ref: http://docs.chef.io/upgrade_server_open_source_notes.html#subcommand-reference
Installing CS12 package on the OSC server makes the chef12-upgrade-download
command available. The CS12 package installs to /opt/opscode
so it doesn't overwrite any of the OSC package. The only impactful change is that the CS12 package install points the /usr/bin/chef-server-ctl
link to the CS12 command. After using chef12-upgrade-download
to download the OSC data the CS12 package can be uninstalled and the /usr/bin/chef-server-ctl
link can be pointed back to the OSC command.
Now you can tar that entire data download directory up and untar it on the new Chef Server 12 server. Then run the transform and upload commands.
If the customer absolutely does not want to install CS12 on the OSC server then they can use the following instructions to download the data.
To manually extract all data from the Open Source Chef Server you need to create a directory on the server where you want to store all the extracted data.
Create a /tmp/knife.rb file that has the following parameters. Set chef_repo_path to the path of the directory you just created.
chef_server_url 'https://localhost'
node_name 'admin'
client_key '/etc/chef-server/admin.pem'
repo_mode 'everything'
versioned_cookbooks true
chef_repo_path '/directory/where/data/will/be/extracted'
Now use knife to download all data except users.
/opt/chef-server/embedded/bin/knife download -c /tmp/knife-config.rb /
To extract the users data you need to upload the create_chef11_key_file.rb script to the Chef server. Any location such as root user's home directory will be fine.
Run the create_chef11_key_file.rb
script and specify the path to the data extraction directory.
/opt/chef-server/embedded/bin/ruby create_chef11_key_file.rb /directory/where/data/will/be/extracted
After running the script you should find a file named /directory/where/data/will/be/extracted/key_dump.json
with the users data in it.
Now you can tar that entire data extraction directory up and untar it on the new Chef Server 12 server and run the transform and upload commands.
Code Reference: