Operations guide

Best use cases for docker-data-move.sh in real operations

A field guide for using docker-data-move.sh when Docker storage outgrows the system disk and manual migration becomes risky.

7 min read · 2026-03-13

The operational problem it solves

docker-data-move.sh is valuable when Docker has quietly grown until the root filesystem is almost full, but you still need a safe and repeatable migration path.

Instead of editing daemon.json and moving directories by hand under pressure, the script turns that migration into a more structured workflow with checks and backups.

Where it fits best

It works best on long-running hosts where Docker was originally installed onto the default root disk, but growth later forced the team to relocate the data-root.

  • Single-node services where Docker data has outgrown the original disk
  • Handoffs where you want a documented, repeatable migration procedure
  • Teams that need a safer path than ad hoc rsync plus config edits

How to read the CentOS 7 output

In the sample output, Docker currently lives on /home/docker-data, that filesystem is almost full, and the script picked /data/docker-data automatically because it has enough free space.

The line starting with Syncing Docker data means the script is already in the rsync stage. At that point, the heavy work is copying layers, volumes, and metadata into the new location.

CentOS 7 terminal output while docker-data-move.sh is running
A real migration run after auto-selecting /data/docker-data as the target path.
  • Current Docker usage: 53.85 GiB
  • Recommended minimum target free space: 61.93 GiB
  • Chosen target: /data/docker-data
  • The docker.socket warning is informational, not a failure

How much longer will it take

A line such as 99% at around 9.30MB/s usually means the copy is in the final stage, but the remaining time still depends on how many small files are left and how fast the disk can flush metadata.

For a host around 53.85 GiB in size, a run already near 99% normally suggests only a few more minutes, but on fragmented or busy disks it can still stretch longer than the percentage implies.

What the completion logs mean

Once rsync reaches the end, the script does not finish immediately. It first backs up the old Docker data directory, then starts Docker again, validates that the daemon is using the new data-root, and finally prints the backup locations for both the old data directory and daemon.json.

In the sample output, the most important success line is Verification passed. Docker Root Dir is now /data/docker-data. That line means the migration is no longer just a file copy; Docker has already started successfully from the new path.

CentOS 7 terminal output after docker-data-move.sh finishes successfully
A successful run showing the backup step, Docker restart, and final verification on the new data-root.
  • 99% with to-chk=0 means the copy stage is effectively done
  • Backing up current Docker data dir means the original directory is preserved for rollback
  • Starting Docker service means the cutover has begun
  • Verification passed is the line you want to capture in a tutorial or ops handoff

Choose the path that fits your role

If you are the operator executing the move, focus on the command, the rsync stage, and the final verification line.

If you are reviewing or approving the change, focus on target disk selection, backup creation, and the final Docker Root Dir check.

If you are turning this into an internal runbook, the checklist below is already ordered in the sequence most teams can follow on-site.

  • Check df -PT and docker info first
  • Run curl -fsSL helper.sh/docker-data-move.sh | sudo bash -s -- --auto --yes
  • Wait through the rsync stage without restarting Docker manually
  • Verify docker info after restart and confirm the new Docker Root Dir

関連トピック

CentOS 7 maintenance and recovery

Keep legacy CentOS 7 hosts installable and maintainable when yum repositories fail, mirrors expire, or Docker data needs to be moved off a crowded disk.

トピックを見る

問題ページ

How to move Docker data-root on CentOS 7

Move Docker data away from a crowded root or home filesystem before the host runs out of disk.

ページを見る