1.3. Restoring MicroShift data backups manually


You can restore MicroShift data from a backup manually. Backups can be restored 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.

注記

On an rpm-ostree system, MicroShift backs up and restores data automatically.

Prerequisites

  • Root access to the host.
  • Full path of the data backup file.
  • The MicroShift service is stopped.

Procedure

  1. Manually restore MicroShift data by using the full file path of the backup you want to restore by running the following command:

    $ sudo microshift restore /var/lib/microshift-backups/<my_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.

    Example output

    ??? I1017 07:39:52.055165    6007 data_manager.go:131] "Copying backup to data directory" storage="/var/lib/microshift-backups" name="test" data="/var/lib/microshift"
    ??? I1017 07:39:52.055243    6007 data_manager.go:154] "Renaming existing data dir" data="/var/lib/microshift" renamedTo="/var/lib/microshift.saved"
    ??? I1017 07:39:52.055326    6007 data_manager.go:227] "Starting copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift-backups/test /var/lib/microshift"
    ??? I1017 07:39:52.061363    6007 data_manager.go:241] "Finished copy" cmd="/bin/cp --verbose --recursive --preserve --reflink=auto /var/lib/microshift-backups/test /var/lib/microshift"
    ??? I1017 07:39:52.061404    6007 data_manager.go:175] "Removing temporary data directory" path="/var/lib/microshift.saved"
    ??? I1017 07:39:52.063745    6007 data_manager.go:180] "Copied backup to data directory" name="test" data="/var/lib/microshift"

  2. Optional. Manually restore data from a customized directory by using the full file path of the backup. Run the following command:

    $ 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.

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

Verification

  • Use the oc get pods -A command to verify that the cluster is running, then check the restored data.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る