# Chef Server 11 Backup / Restore

**URL:** <https://discourse.chef.io/t/chef-server-11-backup-restore/3849>\
**Category:** Chef Infra (archive)\
**Created:** [April 17, 2013, 12:02am UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849 "2013-04-17T00:02:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Barre](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_barre/32/296_2.png) [@Steven\_Barre](https://discourse.chef.io/u/Steven_Barre)\
**Post date:** [April 17, 2013, 12:02am UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/1 "2013-04-17T00:02:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Elvin\_Abordo](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@Elvin\_Abordo](https://discourse.chef.io/u/Elvin_Abordo)\
**Post date:** [April 17, 2013, 12:04am UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/2 "2013-04-17T00:04:03Z")

</div>

> **[Turn it to 11: Upgrading From Chef 10 - Chef Blog | Chef](https://www.chef.io/blog/5106)**
>
> Editor’s Note: A previous version of this blog post recommended setting cookbook\\\_path to nil in the knife.

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 [steven@realestatewebmasters.com](mailto:steven@realestatewebmasters.com)
> 
> Systems Administrator / Programmer  
> Real Estate Webmasters - 250-753-9893  
> ==============================\*\*====================

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

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [April 17, 2013, 12:13am UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/3 "2013-04-17T00:13:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Todd\_Bushnell](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@Todd\_Bushnell](https://discourse.chef.io/u/Todd_Bushnell)\
**Post date:** [April 17, 2013, 7:23pm UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/4 "2013-04-17T19:23:53Z")

</div>

FWIW, I also found this knife-backup plugin quite useful:  
[knife-backup · MD/Blog](http://www.ducea.com/2013/03/04/knife-backup/).

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 [steven@realestatewebmasters.com](mailto:steven@realestatewebmasters.com)
> 
> Systems Administrator / Programmer  
> Real Estate Webmasters - 250-753-9893  
> ==============================\*\*====================

---

<div class="post-metadata">

**Author:** ![Steven\_Barre](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_barre/32/296_2.png) [@Steven\_Barre](https://discourse.chef.io/u/Steven_Barre)\
**Post date:** [April 19, 2013, 1:44am UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/5 "2013-04-19T01:44:31Z")

</div>

Thanks Elvin

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

> **[Chef 11 Released! - Chef Blog | Chef](https://www.chef.io/blog/chef-11-released)**
>
> We’re incredibly proud to share the latest major release of Chef with you.

=================================================  
Steven Barre, RHCE, ZCE, MCP  
[steven@realestatewebmasters.com](mailto: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](http://www.opscode.com/blog/2013/03/12/5106/)
> 
> 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)  
> [mailto: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

---

<div class="post-metadata">

**Author:** ![Steven\_Barre](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_barre/32/296_2.png) [@Steven\_Barre](https://discourse.chef.io/u/Steven_Barre)\
**Post date:** [May 6, 2013, 7:01pm UTC](https://discourse.chef.io/t/chef-server-11-backup-restore/3849/6 "2013-05-06T19:01:29Z")

</div>

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](mailto: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](http://www.ducea.com/2013/03/04/knife-backup/).
> 
> 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)  
> [mailto: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>
> ==================================================
> 
> ```
