How do I back up and restore containers in Container Station?


Last modified date: 2025-02-24

Applicable Products

Container Station

Overview

Container Station offers comprehensive capabilities for exporting, importing, and managing container images and their associated data. These functions are critical for various operational scenarios, including storage driver migrations, system recovery, and data protection.

During the conversion process of the storage driver from overlay to overlay2, the existing container data may need to be restructured or reconfigured, which could involve removing and re-importing containers. Backing up containers before conversion ensures that no data is lost, and restoring them afterward allows you to seamlessly transition to the new storage driver without compromising the operational state of the containers. 

This FAQ provides detailed guidance on these processes, explaining the reason behind steps like container removal and re-import when necessary, such as during storage driver conversions.

Prerequisites

Before proceeding with backing up and restoring your containers, ensure that you have reviewed the process for converting the container's storage driver from overlay to overlay2. For details, see How to convert the storage driver from overlay to overlay2.

Procedure

Note
Before initiating the export, make sure to record the volume ID of any anonymous volumes linked to the container. Make sure that you keep track of the volume ID associated with the container if you plan to reuse the same data with the same container during the import or restoration process.
Important
Container and image backups are inherently tied to the specific system on which they were created. While the backup file itself can be transferred, successfully restoring it to a different environment is not guaranteed due to dependencies on the original system's configuration and resources. For more in-depth information on Docker backup limitations, please refer to the official Docker documentation at https://docs.docker.com.

Backing up or exporting a container

  1. Log in to your QNAP device.
  2. Open Container Station.
    The Overview page appears.
  3. Click Volumes.
  4. Identify the volume linked to the container you want to back up.
  5. Under Actions, click  > Container in Use.
  6. Click the container you want to back up and remove.
    Container Station redirects you to the Details page of the container.
  7. Click the drop-down menu icon next to Edit or Start.
  8. Click Export.
    The Export Container window appears.
  9. Specify a file name.
  10. Optional: Enable Compress Image.
    Note/Tip
    • Selecting this option saves the container or image as a .tar.gz file.
    • A .tar file is an uncompressed archive format used to bundle multiple files and directories into a single file, while a .tar.gz file is a .tar archive that has been compressed using the gzip compression algorithm, resulting in a smaller file size.
  11. Specify a location to export the container or image.
    LocationAction
    Your local deviceClick Local Computer.
    Your QNAP device
    1. Click Local QNAP device.
    2. Click the .
      The Select Folder window opens.
    3. Select a directory to export the container or image.
    4. Click Apply.
  12. Click Export.
    Container Station exports the container.
  13. Save the file to your local device.

Restoring or importing a container

When you restore a container, especially after a storage driver conversion, it is crucial to remove the original container before re-importing it to maintain data integrity and compatibility. This process ensures that the new container is built using the updated storage driver, thereby avoiding potential inconsistencies.

Removing the container

  1. Open Container Station.
    The Overview page appears.
  2. Click Containers.
  3. Identify the container you want to remove.
  4. Under Actions, click .
  5. Click Remove.
    The Remove Containers window appears.
  6. Optional: Select Automatically remove anonymous volumes associated with the container.
    Note
    Enabling this option prevents the original volume from being mounted when you import the container.
  7. Click Yes.
    Container Station removes the container.

Restoring or importing the container

  1. Click Containers.
  2. Click Import.
    The Import Container window appears.
  3. Locate the container on the local computer or on the QNAP device.
    LocationAction
    Your local device
    1. Click Local Computer.
    2. Click .
      A file explorer window opens.
    3. Select the container to import.
    4. Click Open.
    Local QNAP device
    1. Click Local QNAP device.
    2. Click .
      The Select a source image file window appears.
    3. Locate and select a container to import.
    4. Click Apply.
  4. Click Import.
    Container Station imports the container data.
  5. Click Advanced Settings.
  6. Click Storage.
  7. Reattach the previously identified volume to the imported container from the drop-down list.
    Note
    Make sure you verify the volume ID if reusing data from the same container to ensure correct data mapping.
  8. Click Apply.
  9. Click Next.
    The Summary window appears.
  10. Verify the container settings.
  11. Click Finish.

Container Station creates the container with the new storage driver.

Further Reading

Was this article helpful?

13% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      Choose Your Country or Region

      back to top