Files
20260512-skg-tk/docs/pre-redesign-backup-20260524.md
2026-05-24 01:23:16 +08:00

77 lines
2.8 KiB
Markdown

# 2026-05-24 Pre-Redesign Backup
This record was created before the full platform redesign that replaces the old video-recreation-first product flow.
## Code Restore Point
- Branch at backup time: `main`
- Commit at backup time: `04a822ac7903aa249b491c68c80b3cd98d88ae85`
- Remote: `ssh://git@git.kang-kang.com:22222/kangwan/20260512-skg-tk.git`
- Pushed tag: `backup/pre-redesign-20260524-012047`
Restore tracked code to the exact pre-redesign point:
```bash
git fetch origin --tags
git reset --hard backup/pre-redesign-20260524-012047
```
Only run the reset when intentionally replacing the current working tree.
## Local Data Snapshot
Backup directory:
```text
.backups/pre-redesign-20260524-012047/
```
Snapshot contents:
- `api-jobs/` from `api/jobs/`
- `api-product_library/` from `api/product_library/`
- `api-character_library/` from `api/character_library/`
- `api-asset_library/` from `api/asset_library/`
- `api-prompt_library/` from `api/prompt_library/`
- `asset_library/` from `asset_library/`
- `prompt_library/` from `prompt_library/`
- `jobs/` from `jobs/`
- `_trash/` from `_trash/`
- `output/` from `output/`
- `source-04a822ac7903.tgz`
- `dirty-worktree.patch`
Verification at backup time:
- Full backup size: `328M`
- `api/jobs` source task directories: `12`
- `api-jobs` backup task directories: `12`
- `api-jobs` backup size: `132M`
- `api-product_library` backup size: `9.6M`
- `api-character_library` backup size: `91M`
## Data Restore By Overwrite
Use `ditto` to copy the backed up data over the current runtime data directories:
```bash
ditto .backups/pre-redesign-20260524-012047/api-jobs api/jobs
ditto .backups/pre-redesign-20260524-012047/api-product_library api/product_library
ditto .backups/pre-redesign-20260524-012047/api-character_library api/character_library
ditto .backups/pre-redesign-20260524-012047/api-asset_library api/asset_library
ditto .backups/pre-redesign-20260524-012047/api-prompt_library api/prompt_library
ditto .backups/pre-redesign-20260524-012047/asset_library asset_library
ditto .backups/pre-redesign-20260524-012047/prompt_library prompt_library
ditto .backups/pre-redesign-20260524-012047/jobs jobs
ditto .backups/pre-redesign-20260524-012047/_trash _trash
ditto .backups/pre-redesign-20260524-012047/output output
```
`ditto` overwrites matching files but does not delete extra files that were created after the backup. If an exact replacement is required later, remove or move the target directory first, then run the matching `ditto` command.
## Notes
- `.backups/` is ignored by Git and remains local.
- The pushed Git tag protects the source-code restore point even if the local `.backups/` folder is moved.
- The only dirty working-tree change at backup time was `.memory/worklog.json`; its diff was saved as `dirty-worktree.patch`.