Skip to content

Commit 229edf5

Browse files
author
jamescott
committed
add backup topic for enterprise server/private chef
1 parent fe86e1b commit 229edf5

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ BUILDDIR = build
22
S3BUCKET = chef-docs
33
S3OPTIONS = --delete-removed --acl-public --exclude='.doctrees/*' --exclude='chef/.doctrees/*' --config ~/.s3cfg-chef-docs --add-header "Cache-Control: max-age=900"
44

5-
release: master enterprise open_source all
5+
release: master enterprise open_source all server 11-4 11-6
66

77
#
88
# OTHER BUILDS -- REMOVED FOR THE MOMENT
99
#
10-
# all server 11-4 11-6
10+
#
1111
#
1212

1313
clean:

docs_oec/source/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ The |chef server| can be managed in the following ways:
207207

208208
.. raw:: html
209209

210+
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_backup_restore.html">Backup and Restore</a> </br>
210211
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_firewalls_and_ports.html">Firewalls and Ports</a> </br>
211212
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_high_availability.html">High Availability</a> </br>
212213
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_ldap.html">LDAP / Active Directory</a> </br>
@@ -217,7 +218,7 @@ The |chef server| can be managed in the following ways:
217218
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_services.html">Services</a> </br>
218219
&nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_users.html">Users</a> </br>
219220

220-
.. &nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_backup_restore.html">Backup and Restore</a> </br>
221+
221222
.. &nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_orgs.html">Organizations</a> </br>
222223
.. &nbsp;&nbsp;&nbsp; <a href="http://docs.opscode.com/enterprise/server_data.html">Server Data</a> </br>
223224

docs_oec/source/server_backup_restore.rst

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ Backup and Restore
33
=====================================================
44

55
.. include:: ../../includes_server_backup_restore/includes_server_backup_restore.rst
6+
7+
High Availability
8+
=====================================================
9+
10+
.. include:: ../../includes_server_backup_restore/includes_server_backup_restore_ha.rst

docs_server/source/private_chef_1x_install_ha.rst

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ Configure
120120
-----------------------------------------------------
121121
.. include:: ../../includes_private_chef_1x/includes_private_chef_1x_install_ha_config_private_chef_on_frontend.rst
122122

123+
Backups
124+
-----------------------------------------------------
125+
.. include:: ../../includes_server_backup_restore/includes_server_backup_restore_ha.rst
126+
123127
Success!
124128
=====================================================
125129
.. include:: ../../includes_private_chef_1x/includes_private_chef_1x_install_ha_success.rst
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.. The contents of this file are included in multiple topics.
22
.. This file should not be changed in a way that hinders its ability to appear in multiple documentation sets.
33
4-
placeholder_text
4+
Periodic backups of |chef server oec| data are an essential part of managing and maintaining a healthy configuration and to help ensure that important data can be restored, if required.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. The contents of this file may be included in multiple topics.
2+
.. This file should not be changed in a way that hinders its ability to appear in multiple documentation sets.
3+
4+
To configure backups on the backend servers in a |ha| configuration, set a |cron| job in ``/etc/cron.d/opc_snapshot`` similar to the following:
5+
6+
.. code-block:: bash
7+
8+
# rendered by private-chef-ctl reconfigure, do not modify
9+
# Add to /etc/cron.d/opc_snapshot, and then remove comment below MAILTO to activate the cron job
10+
SHELL=/bin/bash
11+
HOME=/opt/opscode/bin
12+
PATH=/usr/bin:/usr/sbin:/bin:/opt/opscode/embedded/bin:/opt/opscode/bin
13+
MAILTO=SOMEONE@payingattention
14+
#17 23 * * * root drbd-backups -g opscode -l drbd > /dev/null 2>&1
15+
16+
A |cron| job similar to the previous example will mount a new snapshot logical volume named::
17+
18+
/dev/opscode/backup-{+%Y-%m-%d-%H-%M-%S}
19+
20+
where ``{+%Y-%m-%d-%H-%M-%S}`` is a format string for year, month, day, so on.
21+
22+
After the |cron| job has run successfully, the ``mount`` command will show the new logical volume mounted on the ``/var/opt/opscode/drbd-backups`` mount point. The backup script will create a snapshot logical volume in unused space in the ``/opscode`` volume group. After the snapshot is created, the backup script will attempt to mount the snapshot logical volume, after which the snapshot will stay mounted for 24 hours. Upon the next |cron| job run, the backup script will attempt to unmount, destroy the snapshot, and then repeat the sequence.
23+
24+
.. note:: The ``drbd-backups`` script with default settings requires at least 40 GB free space in the ``/opscode`` volume group on the backend servers.

0 commit comments

Comments
 (0)