Chef Server 11 Backup / Restore

Ohai!

I’m starting to move some of our operations into the cloud and want to
start using chef to manage the instances. But first I need a proper
backup / recovery plan for my chef-server. All the directions I can find
are for Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how to
restore and get running again.

I understand the cookbooks and databags should be in version control,
but the node data / keys and such is a different matter.

Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.com

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893

i used part of this tutorial in order to back up the chef server and ship a
tarball off to another server in another datacenter.

On Tue, Apr 16, 2013 at 8:02 PM, Steven Barre <
steven@realestatewebmasters.com> wrote:

Ohai!

I'm starting to move some of our operations into the cloud and want to
start using chef to manage the instances. But first I need a proper backup
/ recovery plan for my chef-server. All the directions I can find are for
Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how to
restore and get running again.

I understand the cookbooks and databags should be in version control, but
the node data / keys and such is a different matter.

--
==============================**===================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.**com steven@realestatewebmasters.com

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893
==============================**====================

--
Elvin Abordo
Mobile: (845) 475-8744

On Apr 16, 2013, at 5:02 PM, Steven Barre wrote:

Ohai!

I'm starting to move some of our operations into the cloud and want to start using chef to manage the instances. But first I need a proper backup / recovery plan for my chef-server. All the directions I can find are for Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how to restore and get running again.

I understand the cookbooks and databags should be in version control, but the node data / keys and such is a different matter.

Fortunately it is now a good bit easier, just backup the cookbook storage folder and pg_dump as per normal. You'll have to do a knife reindex when you restore to repopulate solr. If your cookbooks are properly versioned and whatnot you could just do the pgdump at the risk of losing some history, if you don't make use of cookbook releases and version pinning this might not be a big deal (restore strategy for those might just be berks upload).

--Noah

FWIW, I also found this knife-backup plugin quite useful:
knife-backup · MD/Blog.

I preferred that it backed up and restored all cookbook versions; not just
the latest. If you don't necessarily want "all the history" you can
clean-up with knife-cleanup plugin before proceeding with knife-backup. He
details this process in the link above. Cheers.

::toddmichael

On Tue, Apr 16, 2013 at 5:02 PM, Steven Barre <
steven@realestatewebmasters.com> wrote:

Ohai!

I'm starting to move some of our operations into the cloud and want to
start using chef to manage the instances. But first I need a proper backup
/ recovery plan for my chef-server. All the directions I can find are for
Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how to
restore and get running again.

I understand the cookbooks and databags should be in version control, but
the node data / keys and such is a different matter.

--
==============================**===================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.**com steven@realestatewebmasters.com

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893
==============================**====================

Thanks Elvin

In Chef 11 knife-essential is now built in too!

=================================================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.com

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893

On 2013-04-16 17:04, Elvin Abordo wrote:

Turn it to 11: Upgrading From Chef 10 - Chef Blog | Chef

i used part of this tutorial in order to back up the chef server and
ship a tarball off to another server in another datacenter.

On Tue, Apr 16, 2013 at 8:02 PM, Steven Barre
<steven@realestatewebmasters.com
mailto:steven@realestatewebmasters.com> wrote:

Ohai!

I'm starting to move some of our operations into the cloud and
want to start using chef to manage the instances. But first I need
a proper backup / recovery plan for my chef-server. All the
directions I can find are for Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how
to restore and get running again.

I understand the cookbooks and databags should be in version
control, but the node data / keys and such is a different matter.

-- 
=================================================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.com
<mailto:steven@realestatewebmasters.com>

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893 <tel:250-753-9893>
==================================================

--
Elvin Abordo
Mobile: (845) 475-8744

Thanks Todd and Elvin

I found that "knife download / upload" didn't restore nodes / clients /
users.

"knife backup" seems to get everything except users.

So I'm using both to get all the data I want.

Backup

knife backup export -D /home/stack/chef-repo/.chef/chef_server_backup

knife download --purge --chef-repo-path

/home/stack/chef-repo/.chef/chef_server_backup --repo-mode everything /users

Its not documented, but you need to restore all the folders, you cant
just "restore everything" in one go.

knife backup restore clients

knife backup restore cookbooks

knife backup restore data_bags

knife backup restore nodes

knife backup restore roles

Then "knife user create" to create my users. It appears I can't just
pass in the json file file from "knife download /users" though and have
to manually copy paste the data.

=================================================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.com

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893

On 2013-04-17 12:23, Todd Bushnell wrote:

FWIW, I also found this knife-backup plugin quite useful:
knife-backup · MD/Blog.

I preferred that it backed up and restored all cookbook versions; not
just the latest. If you don't necessarily want "all the history" you
can clean-up with knife-cleanup plugin before proceeding with
knife-backup. He details this process in the link above. Cheers.

::toddmichael

On Tue, Apr 16, 2013 at 5:02 PM, Steven Barre
<steven@realestatewebmasters.com
mailto:steven@realestatewebmasters.com> wrote:

Ohai!

I'm starting to move some of our operations into the cloud and
want to start using chef to manage the instances. But first I need
a proper backup / recovery plan for my chef-server. All the
directions I can find are for Chef 10 and the CouchDB, not for v11.

Anyone aware of a good tutorial on how / what to back up? And how
to restore and get running again.

I understand the cookbooks and databags should be in version
control, but the node data / keys and such is a different matter.

-- 
=================================================
Steven Barre, RHCE, ZCE, MCP
steven@realestatewebmasters.com
<mailto:steven@realestatewebmasters.com>

Systems Administrator / Programmer
Real Estate Webmasters - 250-753-9893 <tel:250-753-9893>
==================================================