Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The dependable home-server method is to archive the volume itself, not the container. Docker’s documented workflow mounts a volume in a temporary helper container, writes a tar archive into a directory on the host, and later extracts that archive into a destination volume. Keep that archive separate from container images and deployment files, and use the application’s own backup procedure when a live database needs transactionally consistent data.

This guide shows how to identify the correct volume, create and verify an archive, copy it away from the Docker host, restore it into the same or a replacement container, and test that the application can actually use the recovered files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why Docker volume backups are separate from container backups

Docker volumes are the preferred mechanism for persisting data generated by and used by containers. A named volume normally survives removal of the container that uses it, so deleting and recreating a container does not by itself delete the application’s data. Volumes that are no longer needed can be removed separately. See Docker’s Volumes documentation.

A container image contains software and default filesystem content; a volume contains changing application data. Rebuilding an image or recreating a container therefore does not recreate the files stored in a mounted volume. Docker Desktop’s backup guidance likewise treats volume data as a separate backup item and recommends retaining the options used to create the container or a Compose file so the container can be rebuilt later: Docker Desktop backup and restore.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

The practical recovery set for a home server has three parts:

  • Volume archive: a tar file containing the files from the volume.
  • Container configuration: the image name and tag, environment variables, ports, bind mounts, volume mount paths, networks, and startup settings, preferably in a Compose file.
  • Application-native backups: database dumps or other exports when the software requires a consistency-aware backup.

What you need before starting

  • Shell access to the Docker Engine host.
  • The name of the container that currently uses the data and the path inside that container where the volume is mounted.
  • A host directory with enough free space for the archive. The Docker example writes into the current directory through a host bind mount.
  • Permission to stop or pause the application if its documentation requires quiescence during backup.
  • A second storage location, such as another disk or a NAS, if the backup must survive failure of the Docker host’s storage.

Do not assume that a directory name or volume name is correct. Inspect the running container and the volume metadata first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify the volume and its mount path

List volumes and inspect the candidate

docker volume ls
docker volume inspect APP_DATA_VOLUME

Replace APP_DATA_VOLUME with the actual volume name. The inspection output shows the volume’s host-side mount point and driver information. You normally do not need to manipulate that host path directly; using a helper container keeps the operation in Docker’s supported volume workflow.

Confirm which container and path use it

docker inspect APP_CONTAINER

In the result, find the Mounts entry whose type is volume. Record both the source volume name and its Destination, such as /var/lib/app. The destination is the path that must be supplied to the archive command. If the container has several volumes, back up each one separately or document exactly which data each archive contains.

Check whether the volume is named or anonymous

A named volume has a stable, human-selected name and can be attached explicitly to a replacement container. An anonymous volume has a generated name and is not automatically reused when a new container is created. Docker documents cleanup behavior for some anonymous volumes, including cases involving --rm; therefore, identify the generated volume with docker inspect or docker volume inspect before removing or replacing a container. Record the mapping in your deployment configuration so a future container does not silently start with an empty volume.

Create a tar backup with Docker’s helper-container workflow

1. Prepare the application

For static files, you can often archive while the application is running, but the archive is only a filesystem snapshot. If the application writes data in a way that requires a coordinated pause, stop it or place it in the vendor-documented maintenance or read-only mode first. Docker’s generic tar example does not promise transactional consistency for a live database.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

2. Choose a host directory for the archive

mkdir -p /path/to/docker-backups
cd /path/to/docker-backups

The helper container will see this directory as /backup. The tar file is created on the host, not inside the temporary container, because the directory is bind-mounted into it.

3. Archive the mounted volume

docker run --rm 
  --volumes-from APP_CONTAINER 
  -v "$PWD":/backup 
  ubuntu 
  tar cvf /backup/backup.tar /APP_DATA_PATH

Substitute the real container name for APP_CONTAINER and the volume’s in-container mount path for /APP_DATA_PATH. The --volumes-from option gives the helper container the same volume mounts as the application container. The -v option maps the current host directory to /backup, and tar cvf writes the archive there. Docker documents this pattern in the volume backup instructions.

If the application container has multiple mounts, --volumes-from exposes all of them. Use the path that belongs to the data you intend to archive; do not accidentally archive an unrelated mount or the container’s writable layer.

4. Check that the archive was created

ls -lh backup.tar
tar tf backup.tar | head

Confirm that the file exists, has a plausible size, and lists the expected top-level directory and files. The official example archives /APP_DATA_PATH, so the tar members include that leading directory. This detail determines whether you need --strip 1 during restoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Store a second copy outside the Docker host

A successful tar command proves only that the archive was written. It does not protect against a failed disk, accidental deletion, ransomware, or a mistake that was copied to every location. After creating the archive, copy it to storage that is independent of the Docker host’s primary disk, such as a separate USB drive or NAS. Docker does not require a particular destination; the external copy is an operational resilience choice.

Keep the archive together with a small record of:

  • Creation date and the application version.
  • Volume name and mount path.
  • Container image reference and configuration or Compose file.
  • Whether the application was stopped, quiesced, or backed up with its native tool.
  • The checksum or other integrity information your storage process uses.

Use a retention scheme that leaves more than one historical point when the storage allows it. A backup made after corruption or accidental deletion may faithfully preserve the problem, so older archives can be valuable.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Restore the archive into a volume

1. Prepare a destination volume and container

Restore into a new volume when testing or when the original volume may be damaged. Create or identify a destination container whose volume is mounted at the intended application path. The path must match the archive command’s /APP_DATA_PATH value.

For a replacement deployment, recreate the container from the saved image and configuration, attach a new named volume, and keep the application stopped while files are extracted. Do not let the application initialize an empty destination volume before the restore unless its documentation says that this is safe.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Extract with a helper container

docker run --rm 
  --volumes-from RESTORE_CONTAINER 
  -v "$PWD":/backup 
  ubuntu 
  bash -c 'cd /APP_DATA_PATH && tar xvf /backup/backup.tar --strip 1'

Run this from the directory containing backup.tar. Replace RESTORE_CONTAINER with the container that has the destination volume mounted, and replace /APP_DATA_PATH with that mount path. Docker’s example uses --strip 1 because the archive contains the original leading directory name. If your archive listing shows a different structure, adjust the extraction path and stripping option rather than applying this flag blindly.

3. Correct ownership and permissions if required

The tar archive preserves file metadata available to the archiving process. After extraction, the application must be able to read and write the restored files as the user configured in the container. If the application reports permission errors, compare the restored ownership and mode with a known-good deployment and follow that application image’s documented permission procedure. Avoid broad, recursive permission changes until you understand which user and group the container uses.

4. Start and verify the application

Start the application only after extraction has completed. Verify more than container health:

  • Existing records, documents, media, or settings appear.
  • New data can be written and remains after a restart.
  • Background jobs, indexes, and uploads work as expected.
  • The application logs do not report a migration, corruption, or permission failure.
  • Any dependent services, such as a database or cache, are connected to the intended restored data.

When restoring to another machine, test with a separate project name or isolated network first so the recovered instance cannot overwrite the production service.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Database volumes need an application-aware backup

A tar archive copies filesystem contents; it does not know whether a database transaction was in progress. The Docker volume guide documents the archive mechanics but does not claim that the generic command produces a transactionally consistent live database backup. For a database, use its official dump, snapshot, or backup procedure, or stop and quiesce it exactly as its documentation requires before archiving the resulting files.

You can retain both forms of protection: an application-native dump for logical recovery and a volume archive for configuration, non-database files, or faster whole-service restoration. Label each file clearly so an operator does not mistake a filesystem archive for a database-consistent dump.

Why docker export does not back up a volume

docker container export exports the container filesystem but excludes data in associated volumes. Docker states explicitly: “The docker export command doesn’t export the contents of volumes associated with the container.” See the docker container export reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a volume is mounted over a directory in the container image, an export captures the underlying image-layer directory rather than the mounted volume’s contents. The resulting tar can look successful while omitting the files you care about. Use the volume-aware helper-container command for volume data, and retain image references and configuration separately for rebuilding the container.

Backup methods compared

Method Includes volume contents? Consistency behavior Can restore to a clean volume? Second copy outside host
Helper container plus tar Yes, for the selected mounted path Filesystem archive; stop or quiesce the application when required. No generic live-database guarantee. Yes; extract into a destination volume mounted at the correct path. Not automatic; copy the completed archive to another disk or NAS.
docker container export No; associated volume data is excluded. Not applicable to the missing volume data. No, not for recovering that volume’s contents. Not automatic.
Application-native database backup Exports data according to the database tool, not necessarily every file in the volume. Use the database’s documented consistency guarantees. Usually restored through the database’s own procedure; verify its requirements. Only if you copy the dump to separate storage.
Image rebuild or container commit No; attached volume changes are separate from the image. Does not provide a volume-consistency mechanism. Recreates software, not the missing volume data. Not automatic.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test recovery instead of trusting a successful archive

Schedule a restore drill on a spare volume or another host. Use the same extraction command, then launch an isolated copy of the service and perform the application-level checks listed above. Record the exact image, configuration, volume path, and any ownership fix required. A restore test reveals wrong volume names, missing Compose files, incorrect --strip usage, and database procedures that were never completed.

Keep the production container stopped during a destructive restore. If you must overwrite the original volume, take a fresh archive first and verify that the destination is the intended volume with docker volume inspect.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Troubleshooting common failures

The archive is tiny or contains the wrong directory

Inspect the source container’s Mounts section again. A typo in /APP_DATA_PATH can archive an empty directory from the image layer instead of the mounted volume. Re-run the backup with the exact destination path shown by docker inspect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The restore reports missing files after extraction

List the archive with tar tf backup.tar. If members begin with a leading directory, extract from the destination mount path with --strip 1, as in Docker’s example. If members already begin with the files you expect, do not strip a directory that is not present.

The replacement container starts with empty data

Check that the replacement container is attached to the restored named volume, not a newly generated anonymous volume. Use docker inspect and docker volume inspect to compare the volume name and destination path. Recreate the container from the saved configuration so the mount is explicit.

The application cannot read the restored files

Compare ownership, group, and permissions with the original deployment and consult the image or application documentation for the expected runtime user. Also check that the application is pointing to the same in-container path used during backup.

A database starts but shows incomplete or corrupt data

Treat the tar archive as a filesystem copy, not proof of transaction consistency. Restore the database from its native dump or follow its documented offline-recovery process, then use the volume archive for the remaining service files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A repeatable home-server checklist

  1. Save the Compose file or equivalent container-creation options.
  2. List and inspect the volume; record its name and mount destination.
  3. Stop or quiesce the application, or run its native backup procedure when required.
  4. Create the tar archive with a helper container and a host-side backup directory.
  5. Inspect the archive listing and file size.
  6. Copy the archive and configuration to separate storage.
  7. Periodically create a clean destination volume and run a restore test.
  8. Start an isolated container and verify real application data, writes, and logs.

This separation of volume data, application-consistent backups, and container configuration gives a home server a recovery path even when a container is deleted, an image is replaced, or the Docker host itself must be rebuilt.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.