Lewati ke konten utama

Managing Backups

Managing Backups

Maintenance Journey

Lindungi commit dan tag message files Custy serta simpan timestamped history dengan intentional retention policy.

Commandcusty backup

Category

User Guide

Quick Command

custy backup <commit|tag|all>

message filestimestamped copiesretentionrestore

Tujuan

Custy backups mempertahankan configured commit-message dan tag-message files sebelum Anda mengedit conventions atau menyiapkan releases. Backup ini adalah focused recovery copies, bukan full project, repository, database, atau remote backups.


Pilih Backup Scope

Backup Commands

Commit Message

custy backup commit mempertahankan configured commit-message file.

Tag Message

custy backup tag mempertahankan configured tag-message file.

Both Messages

custy backup all menjalankan kedua focused backup profiles.

Retention Cleanup

custy cleanup backups menghapus older copies sambil mempertahankan configured count.

Recommended Backup Journey

Protect and Retain

1
Review source and destination paths
Konfirmasi message files dan separate backup directories dalam project configuration.
completed
2
Preview creation
Dry-run selected backup command dan konfirmasi timestamped target.
completed
3
Create the backup
Jalankan focused atau all-message backup command normally.
current
4
Verify the copy
Pastikan expected file tersedia dan memuat intended source content.
pending
5
Preview retention cleanup
Dry-run cleanup sebelum menghapus older backups.
pending
Backup both message files
bash
custy --dry-run backup all
custy backup all

Backups menggunakan timestamped names dari source stem. Jika configured source file tidak tersedia, Custy melewati backup tersebut dan tidak membuat content.


Retention dan Cleanup

Generated configuration mempertahankan 10 newest files dalam setiap selected backup category. --keep mengganti count sementara; --type memilih commit, tag, atau all.

Preview and apply retention
bash
custy --dry-run cleanup backups --type all --keep 10
custy cleanup backups --type all --keep 10

Tinjau configured backups_commit dan backups_tag directories sebelum cleanup. Location dan retention merupakan settings terpisah.


Restore Message File

Custy membuat dan membersihkan backups; restoration merupakan deliberate file operation oleh pengguna:

  1. Hentikan active Custy workflow.
  2. Temukan timestamped backup yang benar.
  3. Bandingkan dengan active message file.
  4. Pertahankan current active file jika masih diperlukan.
  5. Salin reviewed backup content ke configured active message file.
  6. Jalankan relevant validation atau dry-run sebelum melanjutkan.

Jangan restore .bak.txt hanya berdasarkan timestamp. Periksa content dan pastikan file tersebut milik commit atau tag messaging.

Backup Checklist

Before You Begin

  • Source existsRequired

    Configured commit atau tag message file tersedia dan memuat version yang ingin dipertahankan.

  • Destination is correctRequired

    Commit dan tag backups di-resolve ke intended separate directories.

  • Retention is sufficientRequired

    Keep count mempertahankan history yang cukup.

  • The copy is verifiedRequired

    Periksa new backup sebelum mengubah source file.

  • Cleanup is previewedRequired

    Gunakan dry-run sebelum menghapus older recovery copies.

Lanjutkan