mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 19:34:03 +01:00
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
New reusable utility that extracts each media_archive_*.zip snapshot, MOVEs its media into ~/cloud/Media/YYYY/MM via sync_media_to_cloud.sh (dedup across the overlapping snapshots), verifies staging drained, then deletes the zip — only after its media is confirmed in the cloud. Staging lives on the cloud filesystem so moves are atomic renames. Ran over ~/Downloads/media_archive_archive: 44 zips / 27 GB → 44 imported + deleted, 0 kept. The two 13.7 GB near-duplicate snapshots collapsed (2412 duplicates dropped). Cloud Media 4.9 GB → 19 GB (2949 files); Downloads reclaimed 27 GB; empty archive dir removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126QvdMrv2WNeUVShFiLTc3
18 lines
1.6 KiB
JSON
18 lines
1.6 KiB
JSON
{
|
|
"title": "Import media_archive_*.zip snapshots into the dufs cloud and delete the zips",
|
|
"objective": "Give a one-command, safe, resumable way to fold the ~/Downloads/media_archive_archive snapshot zips into the self-hosted cloud: extract each, MOVE its media into ~/cloud/Media/YYYY/MM deduplicated against what is already there, and delete the zip only once its media is confirmed in the cloud — so Downloads reclaims the space with no data loss.",
|
|
"acceptance_criteria": [
|
|
"Each zip's media is moved into ~/cloud/Media/YYYY/MM by original mtime, deduplicated across the overlapping snapshots.",
|
|
"A zip is deleted only after its extracted media is verified to have left staging (moved or deduped); on any failure the zip is kept.",
|
|
"Staging is on the cloud filesystem so moves are atomic renames, not copies.",
|
|
"Only media is handled; the archives were verified to contain no non-media files, so nothing else is lost.",
|
|
"After the run the archive directory is empty and removed, and Downloads has reclaimed the space."
|
|
],
|
|
"out_of_scope": [
|
|
"Non-media file handling (none exist in these archives)",
|
|
"Full-content-hash dedup (organizer uses name+size within a date bucket)",
|
|
"Keeping the zips (explicitly deleted per user request)"
|
|
],
|
|
"verifier": "shellcheck; single-zip live test on a throwaway copy; full run over 44 zips (44 imported+deleted, 0 kept; 2412 duplicates dropped on the near-duplicate 13.7 GB snapshot; cloud Media 4.9->19 GB / 2949 files; archive dir removed); documented in docs/superpowers/evidence/import-media-archives-2026-07-12.json"
|
|
}
|