Skip to main content
RunBook Academy

CephCVI · RBD BackupRBD Backup

Full RBD export: mechanics and cost

Intermediate⏱ ~18 minrbd

What you'll learn

  • Export an image to a portable file
  • Understand what the export contains
  • Manage export duration and load
  • Store exports sensibly

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

A full export is the simplest off-cluster copy and it is the one whose duration and load surprise people at production image sizes.

Exporting

# Substitute your own values before running:
POOL=rbd
IMAGE=image01

rbd snap create "$POOL/$IMAGE@backup-$(date +%Y%m%d)"
rbd export "$POOL/$IMAGE@backup-20260818" /backups/image01.raw
# straight to a remote host without landing locally
# Substitute your own values before running:
POOL=rbd
IMAGE=image01

rbd export "$POOL/$IMAGE@backup-20260818" - | \
  ssh backup-host 'cat > /backups/image01.raw'
# compressed in flight, for sparse or compressible images
# Substitute your own values before running:
POOL=rbd
IMAGE=image01

rbd export "$POOL/$IMAGE@backup-20260818" - | \
  zstd -T0 -3 | ssh backup-host 'cat > /backups/image01.raw.zst'
Always export from a snapshot, not the live image. Exporting a live
image reads a moving target.

What the export contains

PropertyIn the export
The image datayes, as a flat raw image
Sparsenesspreserved where the destination supports it
Snapshotsno — one snapshot’s state only
Image metadata and featuresno
The image nameno; it is a file
ls -lh /backups/image01.raw
du -h --apparent-size /backups/image01.raw
du -h /backups/image01.raw
The apparent size is the provisioned size; the actual size reflects
sparseness if the filesystem preserved it.
# what will actually be read
# Substitute your own values before running:
POOL=rbd
IMAGE=image01

rbd du "$POOL/$IMAGE@backup-20260818"

Duration and load

Export duration ≈ used size / read throughput, bounded by whichever of
the cluster, the network, or the target is slowest.
# Substitute your own values before running:
POOL=rbd
IMAGE=image01
SNAP=backup-20260818

time rbd export "$POOL/$IMAGE@$SNAP" /dev/null
BottleneckSignal
Cluster readOSD latency rises during the export
Networktransfer rate plateaus below cluster capability
Target writethe target’s disk is saturated
Single-stream limitone export uses limited parallelism
# limit the impact on the cluster
# Substitute your own values before running:
POOL=rbd
IMAGE=image01
SNAP=backup-20260818

rbd export --rbd-concurrent-management-ops 4 "$POOL/$IMAGE@$SNAP" /backups/img.raw
# watch the impact while it runs
# Substitute your own pool name before running:
POOL=rbd

watch -n 10 "ceph osd pool stats $POOL; ceph osd perf | head -5"
A full export of a large pool's images, run in parallel, is a
significant read load. Staggering them across the window is usually
better than running them concurrently.

Storing exports

ConsiderationPractice
Namingpool, image, snapshot, and date in the filename
Sparsenessstore on a filesystem that preserves holes
Compressionworthwhile for most images; measure first
Integritychecksum on write, verify on read
Retentionas decided by detection delay, not convenience
# Substitute your own values before running:
POOL=rbd
IMAGE=image01
SNAP=backup-20260818

rbd export "$POOL/$IMAGE@$SNAP" - | tee >(sha256sum > /backups/img.sha256) | \
  ssh backup-host 'cat > /backups/pool_image01_20260818.raw'
# verify what arrived
ssh backup-host 'sha256sum /backups/pool_image01_20260818.raw'
cat /backups/img.sha256

Quiz

Knowledge check · 4 questions

  1. Q1. What determines how long an `rbd export` takes?

  2. Q2. An export taken from a live image is worse than a crash-consistent copy, not equivalent to one.

  3. Q3. Plan a full export window.

    Forty RBD images totalling 30 TiB provisioned need nightly off-cluster exports. The backup window is six hours.

  4. Q4. What does an `rbd export` file not contain?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Plan export windows against rbd du used size rather than provisioned size — RBD is thin and the difference is often large. Always snapshot first; a live export reads a moving target and produces a file corresponding to no moment in time.

Cross-course references

  • Kubernetes: volume snapshot before export applies identically
  • Linux: thin-provisioned copies transfer allocated extents, not the address space