forked from cloudfoundry/docs-bbr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcf-backup.html.md.erb
151 lines (121 loc) · 5.96 KB
/
cf-backup.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
title: Configuring Cloud Foundry for BOSH Backup and Restore (Experimental)
owner: BBR
---
This topic describes the configuration you need for your Cloud Foundry deployment
to work with BOSH Backup and Restore (BBR).
This topic assumes that you are using [cf-deployment](https://github.com/cloudfoundry/cf-deployment)
with ops files for your Cloud Foundry deployment.
<p class="note warning">
<strong>WARNING</strong>: The <code>enable-backup-restore.yml</code>,
<code>enable-backup-restore-s3.yml</code>, <code>enable-nfs-broker-backup.yml</code>,
and <code>enable-backup-restore-credhub.yml</code> ops files are currently
experimental and should be used with caution.
</p>
If you do not use ops files for customization,
you can still customize your Cloud Foundry to use BBR.
Examine the contents of the ops files on this page,
and use them as a guide to customize your deployment manifest directly.
<div class="note warning">
<strong>WARNING</strong>:
<ul>
<li><strong>Backup artifacts can contain secrets.</strong> Secure backup artifacts with encryption or by other means.</li>
<li><strong>The restore is a destructive operation.</strong> BBR is designed to restore CF after a disaster.
If it fails, the environment can be left in an unusable state and require reprovisioning.
For the generic method of restoring a deployment, see <a href="restore.html">Restoring with BOSH Backup and Restore</a>.</li>
<li><strong>Developers are unable to push apps for a few minutes during backup and restore.</strong>
This is because the Cloud Controller API (CC API) stops sending and receiving calls
between the <code>pre-backup-lock</code> and <code>post-backup-unlock</code> stages of the process.</li>
<li><strong>BBR does not back up any service data.</strong>
Back up Service data, such as Redis or RabbitMQ data, separately.</li>
</ul>
</div>
## <a id='configure-cf'></a>Supported CF Configurations
Unless otherwise stated, the described functionality is available in `cf-deployment` v1.3.0 and later.
Your CF deployment is compatible with BBR if the following requirements are met:
+ An `enable-backup-restore.yml` ops file is deployed.
+ An internal MySQL database is present.
+ An internal WebDAV/NFS blobstore is present.
+ No optional components, such as a runtime CredHub store or an NFS volume service, are deployed.
If your CF deployment does not fit the above requirements,
then you might be able to use BBR by applying additional ops files as described in the table below
and by using a later version of `cf-deployment`.
<table class="nice">
<tr>
<th>To use BBR with…</th>
<th>Use this ops file…</th>
<th>And…</th>
</tr>
<tr>
<td>A <a href="cf-backup.html#supported-external-databases">supported external database</a>
<code>use-external-dbs.yml</code></td>
<td><a href="https://github.com/cloudfoundry/cf-deployment/blob/master/operations/use-external-dbs.yml">
<code>use-external-dbs.yml</code></a></td>
<td><em>n/a</em></td>
</tr>
<tr>
<td>
An external blobstore hosted on Amazon S3 or a compatible storage solution that supports S3 versioning
and AWS Signature Version 4<br>
<code>use-s3-blobstore.yml</code>
</td>
<td>
<a href="https://github.com/cloudfoundry/cf-deployment/blob/master/operations/experimental/enable-backup-restore-s3.yml">
<code>enable-backup-restore-s3.yml</code></a>
</td>
<td>
<code>cf-deployment</code> v1.4.0 or later.<br>
For instructions, see <a href="external-blobstores.html">Backup and Restore with External Blobstores</a>.
</td>
</tr>
<tr>
<td>
An NFS volume service component<br>
<code>enable-nfs-volume-service.yml</code>
</td>
<td>
<a href="https://github.com/cloudfoundry/cf-deployment/blob/master/operations/experimental/enable-nfs-broker-backup.yml">
<code>enable-nfs-broker-backup.yml</code></a>
</td>
<td><em>n/a</em></td>
</tr>
<tr>
<td>CredHub data store component<br> <code>secure-service-credentials.yml</code></td>
<td>
<a href="https://github.com/cloudfoundry/cf-deployment/blob/master/operations/experimental/enable-backup-restore-credhub.yml">
<code>enable-backup-restore-credhub.yml</code></a>
</td>
<td><em>n/a</em></td>
</tr>
</table>
### <a id='supported-external-databases'></a>Supported External Databases
Cloud foundry components use the backup and restore sdk to interface with databases for backup and restore, which supports the following database versions:
| Name | Version |
|:---------|:--------|
| MariaDB | 10.1.x |
| MySQL | 5.5.x |
| MySQL | 5.6.x |
| MySQL | 5.7.x |
| Postgres | 9.4.x |
| Postgres | 9.6.x |
## <a id="order"></a> Apply Ops Files in the Correct Order
Select the ops files you need and apply them in the following order:
<p class="note"><strong>Note</strong>: This is the <em>relative</em> order.
You do not have to apply all ops files listed below and you can apply other ops files in between.<br>
For example, you can apply an ops file between <code>use-external-dbs.yml</code> and <code>enable-backup-restore.yml</code>,
but do not apply <code>enable-backup-restore.yml</code> <em>before</em> <code>use-external-dbs.yml</code>.
</p>
1. `use-s3-blobstore.yml`
1. `use-external-dbs.yml`
1. `enable-backup-restore.yml`
1. `enable-backup-restore-s3.yml`
1. `enable-nfs-broker-backup.yml`
1. `enable-backup-restore-credhub.yml`
## <a id='process'></a> Next Steps
After Cloud Foundry is configured to be compatible with BBR,
it can be backed up and restored.
Follow the procedures in [Back Up a BOSH Deployment](backup.html#back-up-deployment)
and [Restore a BOSH Deployment](restore.html#restore-deployment).
At minimum, run the pre-backup check against your Cloud Foundry deployment.
Follow the first two steps of [Back Up a BOSH Deployment](./backup.html#back-up-deployment).
This lists the scripts that run during a backup and the order that they are applied in.