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
- Verify that the CDP backup chain for the most recent 7 days is complete.
- Move suspected invalid files first, then verify that recovery points can be mounted in ZStack Cloud.
- 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
- Preparation
- Risk level: Low.
- Existing VM workloads are not affected.
- The rm operation must be exact.
- Verify the seven-day backup chain
- Log in to the CDP backup-server node.
- Enter the relevant directory:
~~~bash cd /backup/cdp/backup/xxx ~~~
- Expected result: The target volume or backup-chain directory is open.
- Filter backup files for one disk:
~~~bash ll | grep <disk_uuid> ~~~
- Expected result: All qcow2 backup files for the disk are listed.
- 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.
- Temporarily move invalid data
- Create a temporary backup directory:
~~~bash mkdir <backup_dir> ~~~
- Expected result: An isolated location is available for suspected invalid data.
- 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.
- Verify recovery points
- Log in to ZStack Cloud and locate the VM.
- 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.
- Delete invalid data
- 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.
- 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
