Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
:_mod-docs-content-type: ASSEMBLY
[id="microshift-backup-and-restore"]
include::_attributes/attributes-microshift.adoc[]
= Backing up and restoring {microshift-short} data
include::_attributes/attributes-microshift.adoc[]
:context: microshift-backup-and-restore

toc::[]

You can manually back up and restore the {microshift-short} database on all supported systems. Greenboot health checks must be completed and you must stop the {microshift-short} service before any backups.
[role="_abstract"]
To back up and restore {microshift-short} data manually, you can use the backup and restore procedures for the database on all supported systems. For application data, you must define your own backup and restore steps.

[NOTE]
====
Expand Down
13 changes: 9 additions & 4 deletions modules/microshift-backing-up-manually.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
[id="microshift-backing-up-manually_{context}"]
= Backing up {microshift-short} data manually

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.
[role="_abstract"]
To back up {product-title} data manually, you can run `microshift backup` with a full path to the backup location. Stop the service first and use the entire path for the output file or directory.

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. You can use the `/var/lib/microshift-backups` for manually backing up and restoring data by specifying it in each command.

.Prerequisites

Expand All @@ -19,9 +22,10 @@ You can back up {microshift-short} data manually at any time. Back up your data
+
[source,terminal]
----
$ sudo microshift backup /var/lib/microshift-backups/<my_manual_backup>
$ sudo microshift backup /var/lib/microshift-backups/_<manual_backup>_
----
Replace `<my_manual_backup>` with the backup name that you want to use.
+
** For `_<manual_backup>_`, specify the backup name that you want to use.
+
.Example output
+
Expand All @@ -42,4 +46,5 @@ $ sudo microshift backup /mnt/<other_backups_location>/<another_manual_backup>
Replace `<other_backups_location>` with the directory you want to use and `<my_manual_backup>` with the backup name you want to use.

.Verification
* 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>`.

* You can verify that the backup exists by viewing the data in the directory you chose. For example, `/var/lib/microshift-backups/_<manual_backup>_/` or `/mnt/_<other_backups_location>_/_<another_manual_backup>_`.
14 changes: 9 additions & 5 deletions modules/microshift-restoring-data-backups.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[id="microshift-restoring-data-backups-manually_{context}"]
= Restoring {microshift-short} data backups manually

You can restore {microshift-short} data from a backup manually. You can restore backups after updates, or after other system events that remove or damage required data. Automated backups are in the `/var/lib/microshift-backups` directory by default. You can use this directory for manually backing up and restoring data by specifying it in each command. When you restore a backup, you must use the entire file path.
[role="_abstract"]
To restore {product-title} data after an update or data loss, you can run `microshift restore` with the full path to the backup. Backups can be restored after updates, or after other system events that remove or damage required data. When you restore a backup, you must use the entire file path.

[NOTE]
====
Expand All @@ -25,9 +26,10 @@ On an `rpm-ostree` system, {microshift-short} backs up and restores data automat
+
[source,terminal]
----
$ sudo microshift restore /var/lib/microshift-backups/<my_manual_backup>
$ sudo microshift restore /var/lib/microshift-backups/_<manual_backup>_
----
Replace `<my_manual_backup>` with the backup name that you used. Optional: You can also restore automatic `ostree` backups using the full file path.
+
** For `_<manual_backup>_`, specify the backup name that you want to use. Optionally, you can also restore automatic `ostree` backups using the full file path.
+
.Example output
+
Expand All @@ -45,9 +47,11 @@ Replace `<my_manual_backup>` with the backup name that you used. Optional: You c
+
[source,terminal]
----
$ sudo microshift restore /<mnt>/<other_backups_location>/<another_manual_backup>
$ sudo microshift restore /mnt/_<other_backups_location>_/_<another_manual_backup>_
----
Replace `<other_backups_location>` with the directory you used and `<my_manual_backup>` with the backup name you used when creating the backup you are restoring.
+
** For `_<other_backups_location>_`, specify the directory that you used.
** For `_<another_manual_backup>_`, specify the backup name that you used when creating the backup you are restoring.

. Restart the host. Restarting the host enables all workloads and pods to restart.

Expand Down
3 changes: 2 additions & 1 deletion modules/microshift-service-stopping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[id="stopping-microshift-service_{context}"]
= Stopping the {microshift-short} service

Use the following procedure to stop the {microshift-short} service.
[role="_abstract"]
To stop the {microshift-short} service, you can run `systemctl stop microshift`. You can also stop any deployed workloads by running `systemctl stop kubepods.slice`.

.Prerequisites

Expand Down