|
4 | 4 |
|
5 | 5 | :_content-type: PROCEDURE
|
6 | 6 | [id="microshift-backing-up-manually_{context}"]
|
7 |
| -= Backing up {product-title} data manually |
| 7 | += Backing up {microshift-short} data manually |
8 | 8 |
|
9 |
| -You can back up {product-title} data manually at any time. Data backups are advised before any system updates. Backups are created in the `/var/lib/microshift-backups` directory by default. You can also specify a directory by adding custom parameters to the required backup command. |
10 |
| - |
11 |
| -[NOTE] |
12 |
| -==== |
13 |
| -On `rpm-ostree` systems, {product-title} creates an automatic backup on every start and restores data automatically. |
14 |
| -==== |
| 9 | +You can back up {microshift-short} data manually at any time. Back up your data before system updates to preserve it for use if an update fails or for other system trouble. Automated backups are created in the `/var/lib/microshift-backups` directory. You can use this directory for manually backing up and restoring data by specifying it in each command. When you create a backup, you must use the entire file path for the output file. |
15 | 10 |
|
16 | 11 | .Prerequisites
|
| 12 | + |
17 | 13 | * You have root access to the host.
|
18 |
| -* {product-title} is stopped. |
| 14 | +* {microshift-short} is stopped. |
19 | 15 |
|
20 | 16 | .Procedure
|
21 |
| -. Manually create a backup by using the default name and parent directory, `/var/lib/microshift-backups/<default-backup-name>`, by running the following command: |
22 |
| -+ |
23 |
| -[source,terminal] |
24 |
| ----- |
25 |
| -$ sudo microshift backup |
26 |
| ----- |
27 |
| -.Example output |
28 |
| -+ |
29 |
| -[source,terminal] |
30 |
| ----- |
31 |
| -??? I0829 07:32:12.313961 6586 run_check.go:28] "Service state" service="microshift.service" state="inactive" |
32 |
| -??? I0829 07:32:12.318803 6586 run_check.go:28] "Service state" service="microshift-etcd.scope" state="inactive" |
33 |
| -??? I0829 07:32:12.318897 6586 version.go:227] "START reading version file" |
34 |
| -??? I0829 07:32:12.319122 6586 version.go:233] "END reading version file" contents={"version":"4.14.0","deployment_id":"rhel-35d7b5c80f0f1378d6846f6dc1304bbf1dcdc5847198fcd4e6099364eaf99048.0","boot_id":"80364fcf3df54284a6902687e2cdd4c2"} |
35 |
| -??? I0829 07:32:12.319256 6586 data_manager.go:82] "Copying data to backup directory" storage="/var/lib/microshift-backups" name="4.14.0__20230829_113212" data="/var/lib/microshift" |
36 |
| -??? I0829 07:32:12.319423 6586 data_manager.go:186] "Starting copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift /var/lib/microshift-backups/4.14.0__20230829_113212" |
37 |
| -??? I0829 07:32:12.324955 6586 data_manager.go:200] "Finished copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift /var/lib/microshift-backups/4.14.0__20230829_113212" |
38 |
| -??? I0829 07:32:12.325014 6586 data_manager.go:115] "Copied data to backup directory" backup="/var/lib/microshift-backups/4.14.0__20230829_113212" data="/var/lib/microshift" |
39 |
| ----- |
40 | 17 |
|
41 |
| -. Optional: Manually create a backup with a specific name in the default directory by running the following command: |
| 18 | +. Manually create a backup by using the parent directory and specifying a name, such as `/var/lib/microshift-backups/<my_manual_backup>`, by running the following command: |
42 | 19 | +
|
43 | 20 | [source,terminal]
|
44 | 21 | ----
|
45 |
| -$ sudo microshift backup --name <my-custom-backup> |
| 22 | +$ sudo microshift backup /var/lib/microshift-backups/<my_manual_backup> |
46 | 23 | ----
|
47 |
| - |
48 |
| -. Optional: Manually create a backup in a specific parent directory by running the following command: |
| 24 | +Replace `<my_manual_backup>` with the backup name that you want to use. |
| 25 | ++ |
| 26 | +.Example output |
49 | 27 | +
|
50 | 28 | [source,terminal]
|
51 | 29 | ----
|
52 |
| -$ sudo microshift backup --storage /var/lib/<custom-storage-location> |
| 30 | +??? I1017 07:38:16.770506 5900 data_manager.go:92] "Copying data to backup directory" storage="/var/lib/microshift-backups" name="test" data="/var/lib/microshift" |
| 31 | +??? I1017 07:38:16.770713 5900 data_manager.go:227] "Starting copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift /var/lib/microshift-backups/test" |
| 32 | +??? I1017 07:38:16.776162 5900 data_manager.go:241] "Finished copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift /var/lib/microshift-backups/test" |
| 33 | +??? I1017 07:38:16.776256 5900 data_manager.go:125] "Copied data to backup directory" backup="/var/lib/microshift-backups/test" data="/var/lib/microshift" |
53 | 34 | ----
|
54 | 35 |
|
55 | 36 | . Optional: Manually create a backup in a specific parent directory with a custom name by running the following command:
|
56 | 37 | +
|
57 | 38 | [source,terminal]
|
58 | 39 | ----
|
59 |
| -$ sudo microshift backup --storage /var/lib/<custom-storage-location>/ --name <my-custom-backup> |
| 40 | +$ sudo microshift backup /mnt/<other_backups_location>/<another_manual_backup> |
60 | 41 | ----
|
| 42 | +Replace `<other_backups_location>` with the directory you want to use and `<my_manual_backup>` with the backup name you want to use. |
61 | 43 |
|
62 | 44 | .Verification
|
63 |
| -* You can verify that the backup exists by viewing the data in the directory you chose. For example, `/var/lib/microshift-backups/<my-custom-backup>/` or `/var/lib/<custom-storage-location>/<my-custom-backup>/`. |
| 45 | +* You can verify that the backup exists by viewing the data in the directory you chose. For example, `/var/lib/microshift-backups/<my_manual_backup>/` or `/mnt/<other_backups_location>/<another_manual_backup>`. |
0 commit comments