Migrating from chef standalone server 12 to HA server

Hello,

I am looking to migrate from Standalone server (12.0.3) setup to HA setup. I would like to know if it is possible to migrate existing data (cookbook, environment, organization etc) from standalone setup to new HA setup.

I was able to setup a new backend cluster but while running “chef-server-ctl reconfigure” on one of the existing standalone server, I ran into following error:

“Bookshelf’s storage_type was previously ‘filesystem’; however
the current configuration would result in a value of ‘sql’.
At this time it is not possible to change the bookshelf storage_type post-installation.”

Is it even possible to do such migration or do I need to treat it like a complete new build and manually re-upload all the data?

Thank you

I migrated all the cookbooks, environments and roles from our POC development server into production using the knife-backup ruby gem.

To install the ruby gem

gem install knife-backup

Then we run the backup of our data, initially using the old knife.rb which will be pointing at the server you wish to extract/export the data from. My example only deals with cookbooks, roles & environments.

knife backup export cookbooks roles environments -D ~/my_chef_backup

Then I created a new chef repo with the correct knife.rb file for the new server (HA or otherwise) and ran the following to import the data into the new server.

knife backup import cookbooks roles environments -D ~/my_chef_backup

All of the information you need about the knife-backup ruby gem can be found here!

Thanks a lot. I’ve used knife-backup in past but didn’t know that it could handle the scenario of going from standalone to HA. I will give it a try shortly.

Thank you

I haven’t used an HA cluster, but if the knife.rb just points to an FQDN of the cluster, I can’t see this being an issue at all.

Indeed. Worked pretty well.

Thank you