Skip to main content

Workflow

Workflow

Recommended

Understand the sequence of operations performed during Backup Cleanup.

Commandcusty cleanup backups

Category

Maintenance

Quick Command

custy cleanup backups

workflowcleanupbackup

Overview​

Backup Cleanup follows a predictable sequence to safely remove obsolete backup files while preserving the newest backups according to the configured retention policy.

No project source files or Git metadata are modified during this workflow.


Backup Cleanup Workflow

High-level execution sequence.

1
Resolve Configuration
Determine the cleanup target and retention count from command-line options, project configuration, or built-in defaults.
completed
2
Locate Backup Files
Scan the configured backup directories for matching backup files.
completed
3
Apply Retention Policy
Sort backup files and determine which files should be preserved.
completed
4
Remove Obsolete Backups
Delete only backup files exceeding the configured retention count.
completed
5
Display Summary
Report the cleanup result and finish the operation.
completed

Workflow Stages

1. Resolve Cleanup Settings
pending
2. Scan Backup Directories
pending
3. Preserve the Newest Backups
pending
4. Remove Old Backups
pending
5. Finish
pending

Backup Cleanup Process

Backup cleanup process
Example output showing Backup Cleanup removing obsolete backup files while preserving the configured number of recent backups.


Workflow Characteristics

Backup Cleanup is designed to be:

  • deterministic,
  • repeatable,
  • configuration-driven,
  • non-destructive to project source files,
  • independent of Git operations.

This makes it suitable for routine maintenance during development and release workflows.


What's Next?

Continue to the Examples page to see common Backup Cleanup scenarios.