mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
45 lines
2.3 KiB
Plaintext
45 lines
2.3 KiB
Plaintext
//Module included in the following assemblies:
|
|
//
|
|
// * microshift_updating/microshift-update-options.adoc
|
|
|
|
:_content-type: PROCEDURE
|
|
[id="microshift-restoring-data-backups-manually_{context}"]
|
|
= Restoring application data backups manually
|
|
|
|
You can restore application data from a backup manually. Backups can be restored after updates, or after other system events that remove or damage required data. Backups are in the `/var/lib/microshift-backups` directory by default. When you restore a backup, you must use the entire file path.
|
|
|
|
[NOTE]
|
|
====
|
|
On an `rpm-ostree` system, {product-title} backs up and restores data automatically.
|
|
====
|
|
|
|
.Prerequisites
|
|
* Root access to the host.
|
|
* Full path of the data backup file.
|
|
* {product-title} is stopped.
|
|
|
|
.Procedure
|
|
|
|
. Manually restore an application backup file by using the full file path of the backup you want to restore by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo microshift restore /var/lib/<custom_backups>/<my_backup>
|
|
----
|
|
+
|
|
.Example output
|
|
+
|
|
[source,terminal]
|
|
----
|
|
??? I0829 07:33:04.715104 6654 run_check.go:28] "Service state" service="microshift.service" state="inactive"
|
|
??? I0829 07:33:04.719562 6654 run_check.go:28] "Service state" service="microshift-etcd.scope" state="inactive"
|
|
??? I0829 07:33:04.719681 6654 data_manager.go:121] "Copying backup to data directory" storage="/var/lib/microshift-backups" name="4.14.0__20230829_113212" data="/var/lib/microshift"
|
|
??? I0829 07:33:04.719802 6654 data_manager.go:138] "Renaming existing data dir" data="/var/lib/microshift" renamedTo="/var/lib/microshift.saved"
|
|
??? I0829 07:33:04.719913 6654 data_manager.go:186] "Starting copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift-backups/4.14.0__20230829_113212 /var/lib/microshift"
|
|
??? I0829 07:33:04.725032 6654 data_manager.go:200] "Finished copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift-backups/4.14.0__20230829_113212 /var/lib/microshift"
|
|
??? I0829 07:33:04.725091 6654 data_manager.go:160] "Removing temporary data directory" path="/var/lib/microshift.saved"
|
|
??? I0829 07:33:04.727461 6654 data_manager.go:165] "Copied backup to data directory" name="4.14.0__20230829_113212" data="/var/lib/microshift"
|
|
----
|
|
+
|
|
.Verification
|
|
* Verify that your backup is restored by restarting {product-title} and checking the data. |