Managing Backups
Managing Backups
Protect Custy's commit and tag message files and keep their timestamped history within an intentional retention policy.
custy backupCategory
Quick Command
custy backup <commit|tag|all>Goalβ
Custy backups preserve configured commit-message and tag-message files before you edit conventions or prepare releases. They are focused recovery copies, not full project, repository, database, or remote backups.
Choose the Backup Scope
Backup Commands
Commit Message
custy backup commit preserves the configured commit-message file.Tag Message
custy backup tag preserves the configured tag-message file.Both Messages
custy backup all runs both focused backup profiles.Retention Cleanup
custy cleanup backups removes older copies while keeping the configured number.Recommended Backup Journey
Protect and Retain
custy --dry-run backup all
custy backup allBackups use timestamped names derived from the source stem. If the configured source file is missing, Custy skips that backup rather than inventing content.
Retention and Cleanup
The generated configuration keeps the 10 newest files in each selected backup
category. --keep temporarily overrides that count; --type selects commit,
tag, or all.custy --dry-run cleanup backups --type all --keep 10
custy cleanup backups --type all --keep 10
Review the configured backups_commit and backups_tag directories before
cleanup. Location and retention are separate settings.
Restore a Message File
Custy currently creates and cleans these backups; restoration is a deliberate file operation performed by the user. To restore safely:
- Stop any active Custy workflow.
- Identify the correct timestamped backup.
- Compare it with the active message file.
- Preserve the current active file if it may still be needed.
- Copy the reviewed backup content into the configured active message file.
- Run the relevant validation or dry-run before continuing.
Do not restore a .bak.txt file based only on its timestampβinspect its content
and verify whether it belongs to commit or tag messaging first.
Backup Checklist
Before You Begin
- Source existsRequired
The configured commit or tag message file exists and contains the version you intend to preserve.
- Destination is correctRequired
Commit and tag backups resolve to the intended separate directories.
- Retention is sufficientRequired
The keep count preserves enough history for your workflow.
- The copy is verifiedRequired
Inspect the new backup before changing the source file.
- Cleanup is previewedRequired
Use dry-run before removing older recovery copies.