mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
64 lines
3.1 KiB
Plaintext
64 lines
3.1 KiB
Plaintext
//Module included in the following assemblies:
|
|
//
|
|
// * microshift_updating/microshift-update-options.adoc
|
|
|
|
:_content-type: PROCEDURE
|
|
[id="microshift-backing-up-manually_{context}"]
|
|
= Backing up {product-title} data manually
|
|
|
|
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.
|
|
|
|
[NOTE]
|
|
====
|
|
On `rpm-ostree` systems, {product-title} creates an automatic backup on every start and restores data automatically.
|
|
====
|
|
|
|
.Prerequisites
|
|
* You have root access to the host.
|
|
* {product-title} is stopped.
|
|
|
|
.Procedure
|
|
. Manually create a backup by using the default name and parent directory, `/var/lib/microshift-backups/<default-backup-name>`, by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo microshift backup
|
|
----
|
|
.Example output
|
|
+
|
|
[source,terminal]
|
|
----
|
|
??? I0829 07:32:12.313961 6586 run_check.go:28] "Service state" service="microshift.service" state="inactive"
|
|
??? I0829 07:32:12.318803 6586 run_check.go:28] "Service state" service="microshift-etcd.scope" state="inactive"
|
|
??? I0829 07:32:12.318897 6586 version.go:227] "START reading version file"
|
|
??? 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"}
|
|
??? 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"
|
|
??? 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"
|
|
??? 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"
|
|
??? 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"
|
|
----
|
|
|
|
. Optional: Manually create a backup with a specific name in the default directory by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo microshift backup --name <my-custom-backup>
|
|
----
|
|
|
|
. Optional: Manually create a backup in a specific parent directory by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo microshift backup --storage /var/lib/<custom-storage-location>
|
|
----
|
|
|
|
. Optional: Manually create a backup in a specific parent directory with a custom name by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo microshift backup --storage /var/lib/<custom-storage-location>/ --name <my-custom-backup>
|
|
----
|
|
|
|
.Verification
|
|
* 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>/`.
|