Document navigation

Scenario

  • Product: ZCF
  • Component: ZStack Cloud
  • Version: 4.8.x
  • Deployment: Dual management
  • Trigger: Invalid CDP history older than 7 days must be cleaned without affecting recent valid recovery points.

Symptoms

  • Historical invalid data exists in the CDP backup directory.
  • Capacity must be reclaimed or invalid files must be cleaned.
  • Do not delete directly; verify valid backup chains and recovery points from the most recent 7 days first.

Assessment

  1. Verify that the CDP backup chain for the most recent 7 days is complete.
  2. Move suspected invalid files first, then verify that recovery points can be mounted in ZStack Cloud.
  3. Delete moved data only after verification succeeds.

Cause

Do not delete old files merely because they appear invalid. First ensure that the backup chain for the most recent 7 days remains complete and recoverable. Validate the chain, move data temporarily, validate recovery points, and only then delete data.

Resolution

  1. Preparation
  • Risk level: Low.
  • Existing VM workloads are not affected.
  • The rm operation must be exact.
  1. Verify the seven-day backup chain
  2. Log in to the CDP backup-server node.
  3. Enter the relevant directory:

~~~bash cd /backup/cdp/backup/xxx ~~~

  • Expected result: The target volume or backup-chain directory is open.
  1. Filter backup files for one disk:

~~~bash ll | grep <disk_uuid> ~~~

  • Expected result: All qcow2 backup files for the disk are listed.
  1. Check the seven-day backup chain:

~~~bash /usr/bin/qemu-img info --output=json --backing-chain -U <xxx.qcow2> | grep full-backing-filename ~~~

  • Expected result: The snapshot chain for the most recent 7 days is complete.
  1. Temporarily move invalid data
  2. Create a temporary backup directory:

~~~bash mkdir <backup_dir> ~~~

  • Expected result: An isolated location is available for suspected invalid data.
  1. Move invalid data instead of deleting it:

~~~bash mv xxx.qcow2 <backup_dir> ~~~

  • Expected result: Invalid data is isolated temporarily and can still be restored.
  1. Verify recovery points
  2. Log in to ZStack Cloud and locate the VM.
  3. In the recovery-points page, select several CDP backups from the most recent 7 days and test whether recovery files mount normally.
  • Expected result: Successfully mounted recovery points confirm that valid data is unaffected.
  1. Delete invalid data
  2. After valid recovery points are confirmed, delete the moved invalid-data directory:

~~~bash rm -rf <backup_dir> ~~~

  • Expected result: Invalid historical data is removed permanently.
  1. Repeat the same procedure for all remaining invalid CDP data.
  • Expected result: The backup directory is cleaned while recovery-point capability remains normal.

Verification

  • Verify that the backup chain for the most recent 7 days remains complete.
  • Verify that recovery points mount normally.
  • Verify that confirmed invalid-data directories are deleted.
  • Verify that VM workloads are unaffected.

Risks and rollback

  • Risk: Running rm -rf before recovery-point validation can delete data that must still be retained.
  • Risk level: Low.

Rollback

If data has only been moved with mv and has not been deleted, restore it to the original location: ~~~bash mv <backup_dir>/xxx xxx

Clean Up Invalid CDP Backup Data | 技术方案 · KB | ZStack Resource Center