-
Notifications
You must be signed in to change notification settings - Fork 332
/
Copy pathenterprise-backup-restore.dita
130 lines (129 loc) · 6.98 KB
/
enterprise-backup-restore.dita
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_rr5_sv3_t5">
<title><cmdname>cbbackupmgr</cmdname> Tool</title><shortdesc>The <cmdname>cbbackupmgr</cmdname> tool is a utility to help manage and store backup and
recovery data on disk for your Couchbase Server. It backs up and restores bucket data, views
creation scripts, index creation scripts, bucket configurations, and so on. Backups are stored
in an Archive Repository that contains each backup.</shortdesc>
<body>
<p>Only Full Administrators can use the new enterprise-grade Backup and Restore tool to back
up larger data sets with much higher performance.</p>
<note type="tip">Backup and restore capabilities are critical to an overall Disaster Recovery
Plan and ensuring business continuity. As part of that plan, it is recommended to define the
plan for <xref href="https://en.wikipedia.org/wiki/Recovery_time_objective" format="html"
scope="external">Recovery Time Objective</xref> (RTO) and <xref
href="https://en.wikipedia.org/wiki/Recovery_point_objective" format="html" scope="external"
>Recovery Point Objective</xref> (RPO) and how the <cmdname>cbbackupmgr</cmdname> tool fits
into that plan.</note>
<p>All backup is stored in and recovered from a <term>Backup Respository</term>. In turn, a
<term>Backup Respository</term> is stored in a Backup Archive on the filesystem. Each backup
job in the <term>Backup Repository</term> stores its backup in two ways: <ul
id="ul_m4b_x5f_z5">
<li>All bucket data is stored in a secondary smaller database (ForestDB).</li>
<li>All bucket creation scripts and configuration files are stored on the file system as
files.</li>
</ul><note type="important">The <cmdname>cbbackupmgr</cmdname> tool is not backward compatible
for backups created using <cmdname>cbbackup</cmdname>.</note></p>
<p>The <cmdname>cbbackupmgr</cmdname> tool is installed with all other tools in the following
locations on each platform: </p>
<p>
<table frame="all" rowsep="1" colsep="1" id="table_a34_jpf_z5">
<title>Backup Tool Locations</title>
<tgroup cols="2">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="5*"/>
<thead>
<row>
<entry>Operating system</entry>
<entry>Directory locations</entry>
</row>
</thead>
<tbody>
<row>
<entry>Linux</entry>
<entry><filepath>/opt/couchbase/bin/cbbackupmgr</filepath>
</entry>
</row>
<row>
<entry>Windows</entry>
<entry><filepath>C:\Program Files\Couchbase\Server\bin\cbbackupmgr</filepath>
<p>Assumes default installation location</p></entry>
</row>
<row>
<entry>Mac OS X</entry>
<entry><filepath>/Applications/Couchbase
Server.app/Contents/Resources/couchbase-core/bin/cbbackupmgr</filepath>
</entry>
</row>
</tbody>
</tgroup>
</table>
</p>
<section><title>How the Backup and Restore Tool Works</title>
<p>By default, the <cmdname>cbbackupmgr</cmdname> tool performs incremental backups to back up
only the new data. However, on a new cluster and for the first time, this tool generates a
full backup. Each of the subsequent incremental backups take a fraction of the time taken by
the full backup. </p></section>
<section><title>Archive Repository</title>
<p>The backup archive is a directory that contains a set of backup repositories as well as
logs for the backup client. The backup directory should be modified only by the backup
client, and any modifications that are not done by that client might result in a corruption
of backup data. </p>
<p>Only one backup client can access the backup archive at one time. If multiple instances of
the backup client are running on the same archive at the same time, this might result in
corruption. To prevent such corruption instances, you may be required to create multiple
backup archives depending on your use case. </p>
</section>
<!-- <section>
<title>Sample Bucket Backup</title>
<p>Here are the steps to follow to perform a simple, quick backup across all nodes of the
cluster.</p>
<p>The examples are to a server on localhost, but they could be to a remote cluster. You must
provide at one node of the target cluster and the <cmdname>backup</cmdname> command will get
the cluster map. </p>
<dl>
<dlentry>
<dt>Create an archive repository with the command <cmdname>create</cmdname>:</dt>
<dd>It is required that each archive has a directory path to store the backups and a name
to refer to it.</dd>
<dd>
<p>On Linux and Mac OS:
<codeblock>$> ./backup create &-;&-;name travel &-;&-;dir /data/couchbase/backups </codeblock></p>
</dd>
<dd>This creates a backup directory named <codeph>travel</codeph>. If this directory does
not exist, the backup tool will attempt to create it. </dd>
</dlentry>
</dl>
<dl>
<dlentry>
<dt>Back up the bucket with the command <cmdname>cluster</cmdname>:</dt>
<dd>
<p>On Linux and Mac OS:
<codeblock>$> ./backup cluster &-;&-;dir /data/couchbase/backups &-;&-;host couchbase://<varname>localhost</varname> \
&-;&-;username <varname>MyAdminUsername</varname> &-;&-;password <varname>MyAdminPassword</varname> &-;&-;name travel</codeblock></p>
</dd>
<dd>The output of these commands will look similar to the following: <p><image
href="../admin/picts/backup-output.png" id="image_hqm_kmb_y5"/>
</p></dd>
<dd>The duration and size of your backups will vary depending on the size of your data,
number of nodes, network congestion, disk speed, cluster activity, among other
things.</dd>
</dlentry>
</dl>
<dl>
<dlentry>
<dt>Restore the bucket data with the command <cmdname>restore</cmdname></dt>
<dd>Here are the steps to do a restore operation on a cluster.</dd>
<dd>
<p>On Linux and Mac OS:
<codeblock>$> ./backup restore restore &-;&-;dir=/data/couchbase/backups &-;&-;host couchbase://<varname>localhost</varname> \
&-;&-;username <varname>MyAdminUsername</varname> &-;&-;password <varname>MyAdminPassword</varname> &-;&-;name travel</codeblock></p>
</dd>
</dlentry>
</dl>
</section> -->
</body>
<related-links>
<link href="../security/concepts-rba.dita#concept_ntl_jph_hr"/>
</related-links>
</topic>