コンテンツにスキップ

Backup the Porta On Prem WSL virtual disk

このコンテンツはまだ日本語訳がありません。

This guide will walk you through backing up the WSL virtual disk for Porta On Prem data.

  1. Use the system tray to shut down Docker Desktop.
  2. After Docker has finished shutting down, open Powershell.
  3. Run wsl --shutdown to stop all distributions.
  4. Run wsl -l -v and ensure the docker distros are stopped. A successful output will look like this:
    NAME STATE VERSION
    * Ubuntu-22.04 Stopped 2
    docker-desktop-data Stopped 2
    docker-desktop Stopped 2
  5. Export the docker-desktop-data distribution to a .tar file.
    1. Open powershell as an administrator.

    2. Confirm that docker-desktop-data exists and is stopped by running:

      wsl -l -v

      A successful output will look like this:

      NAME STATE VERSION
      * Ubuntu-22.04 Stopped 2
      docker-desktop-data Stopped 2
      docker-desktop Stopped 2
    3. In Powershell, run the following command to export the docker-desktop-data distribution to a .tar file.

      • In the command, replace D:\path\to\backup with your desired backup directory.
        • This directory must already exist prior to exporting. Create a new directory if necessary.
      • Make sure the export destination has enough free disk space.
      • The export may take a while if the virtual disk is large (anywhere from 5 to 15 minutes).
      • Terminal window
        wsl --export docker-desktop-data D:\path\to\backup\docker-desktop-data.tar
    4. You’ll know the export has finished when the PS C:\Users\username> prompt appears again on the next line.

  6. Verify the backup file was created successfully.
    1. Navigate to the backup directory you specified in step 2.
    2. Confirm that the docker-desktop-data.tar file exists.
    3. Check the file size to ensure it’s greater than 0 bytes.