You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update backup_restore.md
* fix typo
* Update documentation/backup_restore.md
* Update backup_restore.md
Integrating the extra note (added to SOLARCH 1160 branch) that was causing the conflict into my changes.
* Update backup_restore.md
* [ITHELP-87329] Update test-backup-restore.yaml (#446)
This looks like it should work with the `pull_request` event
---------
Co-authored-by: Ben Ford <[email protected]>
Copy file name to clipboardExpand all lines: documentation/backup_restore.md
+37-55
Original file line number
Diff line number
Diff line change
@@ -14,63 +14,46 @@ If your PE installation is managed by PEADM, you can back up and restore PE usin
14
14
1. Use the `peadm::backup` plan to create a backup of your primary server.
15
15
2. Use the `peadm::restore` plan to restore PE from a `peadm::backup`.
16
16
17
-
**Important:** If your PE installation is not managed by PEADM, you cannot use the `peadm::backup` and `peadm::restore` plans. For information on converting to a PEADM-managed installation, see [Convert](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/convert.md).
17
+
**Important:** If your PE installation is not managed by PEADM, you cannot use the `peadm::backup` and `peadm::restore` plans. For information about converting to a PEADM-managed installation, see [Convert](https://github.com/puppetlabs/puppetlabs-peadm/blob/main/documentation/convert.md).
18
18
19
-
When running the backup and restore plans, you can define the `backup_type` and `restore_type` parameters with either of the following values:
20
-
*`recovery`: Use this type to create a full backup of your primary server, including data for all services. This allows you to restore your primary server and all services (including database services running on external servers) to the exact state they were in at the time of the backup.
21
-
*`custom`: Use this type when you want to selectively back up and restore data for specific services.
19
+
You can specify the type of backup or restore plan you want to use. There are two types:
20
+
-`recovery`: Use this type to create a full backup of your primary server, including data for all services. The recovery option allows you to restore your primary server and all services (including database services running on external servers) to the exact state they were in at the time of the backup.
21
+
-`custom`: Use this type when you want to back up and restore data for specific services.
22
22
23
23
If no type is specified, the default is `recovery`.
24
24
25
-
(When running the restore plan, you can use the `recovery-db` restore type to recover a failed database server (see [Recovering a broken database server in an extra-large installation](#recovering-a-broken-database-server-in-an-extra-large-installation)).)
26
-
27
-
When backing up or restoring PE, you must use the `--targets` option to specify the hostname (FQDN) of your primary server.
28
-
**Note**: the hostname of your primary server you are restoring to _must be equal_ to the hostname of the primary server you created the backup from.
29
-
In other words, you can't change the hostname of your primary server during the recovery process.
30
-
31
-
The backup file created is named `pe-backup-YYYY-MM-DDTHHMMSSZ.tar.gz` and placed by default in `/tmp`. To specify a different location for the backup file, you can define the `output_directory` parameter.
32
-
33
-
This example shows how to run a `recovery` backup which places the backup file in a custom location.
34
-
```
35
-
bolt plan run peadm::backup --targets my.primary.vm backup_type=recovery output_directory=/custom_path
36
-
```
37
-
38
-
When restoring PE, you must define the `input_file` parameter to specify the path to the backup file you want to use. For example:
39
-
```
40
-
bolt plan run peadm::restore --targets my.primary.vm input_file="/tmp/my_backup.tar.gz"
41
-
```
25
+
**Important**: When restoring your installation, the hostname of the primary server you are restoring to _must be the same as_ the hostname of the primary server you created the backup from.
26
+
You cannot successfully restore your installation if you change the hostname of your primary server during the recovery process.
42
27
43
28
## Using `recovery` backup and restore
44
29
45
30
When you run a `recovery` backup plan, the primary server configuration is backed up in full. In the event of a primary server failure, this backup can be used to to restore your primary server and all services (including database services running on external servers) to the exact state they were in at the time of the backup.
46
31
47
-
You can create a `recovery` backup as follows:
32
+
### Create a `recovery` backup
33
+
Run one of the following commands:
34
+
- To create the backup file in the default location, run the `peadm::backup` plan, including the `--targets` option to specify the hostname (FQDN) of your primary server:
48
35
```
49
36
bolt plan run peadm::backup --targets my.primary.vm backup_type=recovery
50
37
```
51
-
Alternatively, because `recovery` is the default type, you can use this simplified command:
38
+
-Alternatively, because `recovery` is the default type, you can use this simplified command:
52
39
```
53
40
bolt plan run peadm::backup --targets my.primary.vm
54
41
```
55
-
56
-
To restore your installation from this backup, run:
42
+
- To place the backup file in a custom location, define the `output_directory` parameter. For example:
43
+
```
44
+
bolt plan run peadm::backup --targets my.primary.vm backup_type=recovery output_directory=/custom_path
45
+
```
46
+
### Restore your installation from a `recovery` backup
47
+
Run the `peadm::restore` plan, including the `--targets` option to specify the hostname (FQDN) of your primary server and defining the `input_file` parameter to specify the path to the backup file you want to use. For example.
57
48
```
58
49
bolt plan run peadm::restore --targets my.primary.vm input_file="/tmp/my_backup.tar.gz"
59
50
```
60
-
61
-
**Tip**: Restoring from a `recovery` backup restarts any services that are unavailable on the primary server.
51
+
**Note**: Restoring from a `recovery` backup restarts any services that are unavailable on the primary server.
62
52
63
53
## Using `custom` backup and restore
64
-
65
-
To specify the items that are backed up and restored, define the `backup_type` or `restore_type` parameters as `custom`.
66
-
Otherwise, the default type is `recovery`.
67
-
68
-
**Note:** To customize the list of items that are backed up and restored, you must define the `backup` and `restore` parameters, specifying the items you want to exclude.
69
-
70
-
To specify the `custom` items, you can create and reference `params.json` files as shown in the following examples.
71
-
72
-
To specify custom backup options:
73
-
```json
54
+
### Create a `custom` backup.
55
+
To customize the items you back up, first create a JSON file in which you define the `backup_type` parameter as `custom` and define the `backup` parameter by specifying which items you want to exclude. For example:
56
+
```
74
57
{
75
58
"backup_type" : "custom",
76
59
"backup": {
@@ -85,15 +68,13 @@ To specify custom backup options:
85
68
}
86
69
}
87
70
```
88
-
89
-
To create a backup using the options specified in this parameter file, run:
71
+
When you have created the JSON file specifying your custom backup, run the `peadm::backup` plan, including the `--params` option and specifying the relevant filename (and file path if necessary). For example:
90
72
```
91
73
bolt plan run peadm::backup --targets my.primary.vm --params @params.json
92
74
```
93
-
94
-
To specify custom restore options:
95
-
96
-
```json
75
+
### Restore custom items
76
+
To customize the items you restore, create a JSON file in which you define the `restore_type` parameter as `custom`, define the `restore` parameter by specifying the items you want to exclude, and define the `input_file` parameter by specifying the path to the relevant backup file. For example,
77
+
```
97
78
{
98
79
"restore_type" : "custom",
99
80
"restore": {
@@ -110,7 +91,7 @@ To specify custom restore options:
110
91
}
111
92
```
112
93
113
-
To restore PE using the options specified in this parameter file, run:
94
+
When you have created the JSON file specifying your custom restore options, run the `peadm::restore` plan, including the `--params` option and specifying the relevant filename (and file path if necessary). For example:
114
95
```
115
96
bolt plan run peadm::restore --targets my.primary.vm --params @params.json
116
97
```
@@ -160,21 +141,22 @@ To do this, use the plan `peadm::util::init_db_server` as follows:
160
141
bolt plan run peadm::util::init_db_server db_host=my.primary_db.vm pe_version=2023.5.0 install_pe=true pe_platform=el-8-x86_64
161
142
```
162
143
163
-
This plan will perform the following:
144
+
This plan performs the following tasks:
164
145
165
-
1. Clean the current certificate for the database server from the primary server.
166
-
1. Request a new certificate for the database server with the right extensions (peadm_role = puppet/puppetdb-database, peadm_availability_group=A).
167
-
1. Stop the puppetdb service on the compilers.
168
-
1. Prepare a `pe.conf` file on the database server for database installation
169
-
1. Install PE on the database server using the generated `pe.conf` file.
170
-
1. Configure the database as the primary puppetdb database in the XL installation.
171
-
1. Run puppet on the compilers to allow puppetdb on the compilers to be reconfigured with the new primary database server.
172
-
1. Start the puppetdb service on the compilers.
173
-
1. Restart the puppetserver service on the compilers.
146
+
1. Cleans the current certificate for the database server from the primary server.
147
+
1. Requests a new certificate for the database server with the right extensions (`peadm_role = puppet/puppetdb-database`, `peadm_availability_group=A`).
148
+
1. Stops the puppetdb service on the compilers.
149
+
1. Prepares a `pe.conf` file on the database server for database installation
150
+
1. Installs PE on the database server using the generated `pe.conf` file.
151
+
1. Configures the database as the primary puppetdb database in the XL installation.
152
+
1. Runs puppet on the compilers to allow puppetdb on the compilers to be reconfigured with the new primary database server.
153
+
1. Starts the puppetdb service on the compilers.
154
+
1. Restarts the puppetserver service on the compilers.
174
155
175
156
1. Perform a `recovery-db` restore of your database server, specifying the backup file that you want to use. For example:
176
157
```
177
158
bolt plan run peadm::restore --targets my.primary.vm input_file="/tmp/my_backup.tar.gz" restore_type=recovery-db
178
159
```
179
-
**Important**: You must use the `restore_type=recovery-db` parameter to recover the database server.
160
+
**Important**: You must use the `restore_type=recovery-db` parameter to recover the database server.
161
+
180
162
**Important**: You must specify the primary server host node (not the database server host node) as the target for the restore plan.
0 commit comments