Backing up Open Source Chef Server 11

ohai Chefs,

I'm wanting to perform an sql backup on my chef server. I used the omnibus
installer to install the service and left all the attributes at default.

Using the default password ("snakepliskin") will not get me in

/opt/chef-server/embedded/bin/pg_dump -h localhost -p 5432 -U opscode_chef

chefserver_20140702.sql
Password:
pg_dump: [archiver (db)] connection to database "opscode_chef" failed:
FATAL: password authentication failed for user "opscode_chef"

Even a console connection fails:

root@chef-server:~# /opt/chef-server/embedded/bin/psql -h 127.0.0.1 -p 5432
-U opscode_chef
Password for user opscode_chef:
psql: FATAL: password authentication failed for user "opscode_chef"

I know there are a bunch of cool gems for knife that can use the API to get
everything, but I'd like to keep it simple.

Any ideas?

Thanks in advance.

Hi there,

Let me start by asking a few questions:

  1. What version of the open source Chef Server are you running. We just
    recently released an updated version (11.1.3) with some tightened security
    around PostgreSQL permissions.

  2. Where did you get the default password "snakepliskin"? The Chef Server
    generates the database passwords on the initial reconfigure.

  3. (Not a question) Backing up just the SQL database will not be enough to
    restore your Chef Server to a functional state in a disaster recovery
    scenario. You'll also need to back up the Bookshelf (cookbook content) data
    that is stored as files on disk as well as the Solr index.

-Stephen

On Wed, Jul 2, 2014 at 1:14 PM, Matthew Hollingdale <
matthew.hollingdale@gmail.com> wrote:

ohai Chefs,

I'm wanting to perform an sql backup on my chef server. I used the omnibus
installer to install the service and left all the attributes at default.

Using the default password ("snakepliskin") will not get me in

/opt/chef-server/embedded/bin/pg_dump -h localhost -p 5432 -U opscode_chef

chefserver_20140702.sql
Password:
pg_dump: [archiver (db)] connection to database "opscode_chef" failed:
FATAL: password authentication failed for user "opscode_chef"

Even a console connection fails:

root@chef-server:~# /opt/chef-server/embedded/bin/psql -h 127.0.0.1 -p
5432 -U opscode_chef
Password for user opscode_chef:
psql: FATAL: password authentication failed for user "opscode_chef"

I know there are a bunch of cool gems for knife that can use the API to
get everything, but I'd like to keep it simple.

Any ideas?

Thanks in advance.

--
Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104

The following two files might be helpful in determining what are the
generated passwords:

/etc/chef-server/chef-server-running.json
/etc/chef-server/chef-server-secrets.json

On Wed, Jul 2, 2014 at 1:14 PM, Matthew Hollingdale <
matthew.hollingdale@gmail.com> wrote:

ohai Chefs,

I'm wanting to perform an sql backup on my chef server. I used the omnibus
installer to install the service and left all the attributes at default.

Using the default password ("snakepliskin") will not get me in

/opt/chef-server/embedded/bin/pg_dump -h localhost -p 5432 -U opscode_chef

chefserver_20140702.sql
Password:
pg_dump: [archiver (db)] connection to database "opscode_chef" failed:
FATAL: password authentication failed for user "opscode_chef"

Even a console connection fails:

root@chef-server:~# /opt/chef-server/embedded/bin/psql -h 127.0.0.1 -p
5432 -U opscode_chef
Password for user opscode_chef:
psql: FATAL: password authentication failed for user "opscode_chef"

I know there are a bunch of cool gems for knife that can use the API to
get everything, but I'd like to keep it simple.

Any ideas?

Thanks in advance.

--
Best regards, Dmitriy V.

Knife-backup will help us to take the backup of all the cookbooks,nodes,
etc..

On Thu, Jul 3, 2014 at 7:40 AM, DV vindimy@gmail.com wrote:

The following two files might be helpful in determining what are the
generated passwords:

/etc/chef-server/chef-server-running.json
/etc/chef-server/chef-server-secrets.json

On Wed, Jul 2, 2014 at 1:14 PM, Matthew Hollingdale <
matthew.hollingdale@gmail.com> wrote:

ohai Chefs,

I'm wanting to perform an sql backup on my chef server. I used the
omnibus installer to install the service and left all the attributes at
default.

Using the default password ("snakepliskin") will not get me in

/opt/chef-server/embedded/bin/pg_dump -h localhost -p 5432 -U
opscode_chef > chefserver_20140702.sql
Password:
pg_dump: [archiver (db)] connection to database "opscode_chef" failed:
FATAL: password authentication failed for user "opscode_chef"

Even a console connection fails:

root@chef-server:~# /opt/chef-server/embedded/bin/psql -h 127.0.0.1 -p
5432 -U opscode_chef
Password for user opscode_chef:
psql: FATAL: password authentication failed for user "opscode_chef"

I know there are a bunch of cool gems for knife that can use the API to
get everything, but I'd like to keep it simple.

Any ideas?

Thanks in advance.

--
Best regards, Dmitriy V.

--
·.·´¨) Alwayz ·.¸(¨·.·´¨) Keep Loving & (¨·.·´¨)´ Keep Smiling !
`·.¸.·´
·..·:Shanker:·..·:

@Stephen:

  1. 11.1.3
  2. Here
    https://github.com/opscode/omnibus-chef-server/blob/master/files/chef-server-cookbooks/chef-server/attributes/default.rb
  3. Yep - Sorry I didn't mention that I was following the guide on the
    opscode site
    https://wiki.opscode.com/display/chef/Backup+Chef+Server+V11+Components,
    and had already backed up the Bookshelf. However it made no mention of Solr
  • Thank you for the extra tip!

@DV
Thanks! Will look into it.

@Shanker
Thank you - I've been looking into this.

On 3 July 2014 02:31, Stephen Delano stephen@opscode.com wrote:

Hi there,

Let me start by asking a few questions:

  1. What version of the open source Chef Server are you running. We just
    recently released an updated version (11.1.3) with some tightened security
    around PostgreSQL permissions.

  2. Where did you get the default password "snakepliskin"? The Chef Server
    generates the database passwords on the initial reconfigure.

  3. (Not a question) Backing up just the SQL database will not be enough to
    restore your Chef Server to a functional state in a disaster recovery
    scenario. You'll also need to back up the Bookshelf (cookbook content) data
    that is stored as files on disk as well as the Solr index.

-Stephen

On Wed, Jul 2, 2014 at 1:14 PM, Matthew Hollingdale <
matthew.hollingdale@gmail.com> wrote:

ohai Chefs,

I'm wanting to perform an sql backup on my chef server. I used the
omnibus installer to install the service and left all the attributes at
default.

Using the default password ("snakepliskin") will not get me in

/opt/chef-server/embedded/bin/pg_dump -h localhost -p 5432 -U
opscode_chef > chefserver_20140702.sql
Password:
pg_dump: [archiver (db)] connection to database "opscode_chef" failed:
FATAL: password authentication failed for user "opscode_chef"

Even a console connection fails:

root@chef-server:~# /opt/chef-server/embedded/bin/psql -h 127.0.0.1 -p
5432 -U opscode_chef
Password for user opscode_chef:
psql: FATAL: password authentication failed for user "opscode_chef"

I know there are a bunch of cool gems for knife that can use the API to
get everything, but I'd like to keep it simple.

Any ideas?

Thanks in advance.

--
Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104

--

Q29uZ3JhdHMsIFNoZXJsb2NrIQ==