Dateispeicher migrieren
Migriert Dateispeicher durch geprüfte Kopien und kontrollierte Routingwechsel mit nutzbarer Wiederherstellungsquelle.
file-storage-migration
Entdecke, wie der Skill hilftWann ist der Skill hilfreich?
Nutze ihn beim Wechsel von Buckets, Anbietern oder Objektschlüsseln ohne Bruch vorhandener Dateizugriffe.
Wobei hilft er dir?
- Erfasst Anbieter, Bucket, Schlüssel, Prüfsumme und Dateigröße.
- Kopiert mit begrenzten Workern und prüft vor Zeigerwechsel.
- Bewahrt Metadaten und Quellobjekte während des Wiederherstellungsfensters.
Das könntest du fragen
Verschiebe private Dateien in einen neuen Bucket ohne bestehende Downloads zu brechen. Kopiere eine Stichprobe mit großen Dateien und signierten Downloads. Prüfe Prüfsummen und Zugriff vor Referenzwechsel; Originale bleiben zur Wiederherstellung verfügbar.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
File Storage Migration
Migrating files between local disk and cloud object storage (or between AWS S3, Cloudflare R2, Azure Blob and GCS, or reorganizing key prefixes) requires moving gigabytes or terabytes of mutable state while live users continue uploading, downloading and deleting files.
1. Store Explicit Location Metadata Per File
To support zero-downtime migration without breaking active files, record the storage location on each files (and file_derivatives) row:
storage_provider/storage_backend(e.g.,'local','s3_legacy','r2_primary')storage_bucketstorage_keysha256/size_bytes
When each file row knows which backend and key holds its bytes, the application can route reads per-file without guessing or falling back through slow blind 404 probes.
2. Four-Phase Zero-Downtime Migration Pattern
Execute storage migrations in verifiable phases:
- Phase 1 — Dual-Read / Location-Aware Routing:
- Deploy read/download/delete handlers that resolve the storage adapter from the file row's
storage_backend(or fall back fromnew_store->old_storeduring transition).
- Deploy read/download/delete handlers that resolve the storage adapter from the file row's
- Phase 2 — Switch New Writes to Target Store:
- Direct all newly initiated uploads and newly generated derivatives to the target storage backend (
storage_backend = 'target'). - Ensure deletions remove the object from whichever backend(s) currently hold it.
- Direct all newly initiated uploads and newly generated derivatives to the target storage backend (
- Phase 3 — Idempotent Background Backfill & Checksum Verification:
- Run a resumable batch worker over remaining rows where
storage_backend = 'legacy':- Stream object from
legacytotarget. - Verify
targetobject viaHeadObjectand compare exactsize_bytesandsha256digest against the source. - Atomically update the DB row (
UPDATE files SET storage_backend = 'target', storage_key = :newKey WHERE id = :id AND deleted_at IS NULL). - If the file was soft-deleted while the copy was in flight, delete the newly copied target object immediately so no orphan is left behind!
- Stream object from
- Run a resumable batch worker over remaining rows where
- Phase 4 — Verification Audit & Legacy Decommission:
- Confirm
SELECT COUNT(*) FROM files WHERE storage_backend = 'legacy'is0. - Keep the legacy bucket in read-only/archive state for a safety observation window before scheduling final deletion (with explicit authorization).
- Confirm
3. Guardrails During Migration
- Never delete source objects during the copy step: only delete from the legacy store after the target copy is checksum-verified, the DB pointer is committed, and the rollback window has passed.
- Preserve
Content-Typeand custom metadata when copying objects across buckets so signed downloads do not revert toapplication/octet-stream. - Rate-limit backfill workers so migration bandwidth and IOPS do not starve live user uploads or trigger provider
503 SlowDownthrottling.
Enthaltene Dateien 1
SKILL.md
Über dieses Skill-Paket
file-storage-migration
file-storage-migration: Entwickelt verlässliche Datei- und Medienabläufe von Uploads und Vorschauen bis zu privater Auslieferung, Aufbewahrung und Speichermigrationen.
Weniger anzeigen
file-storage-migration
file-storage-migration: Entwickelt verlässliche Datei- und Medienabläufe von Uploads und Vorschauen bis zu privater Auslieferung, Aufbewahrung und Speichermigrationen.
Enthält den vollständigen Skill und seine Begleitdateien (1 Dateien). Der genaue, ursprünglich verfasste Anwendungsbereich bleibt unten erhalten.
Ursprüngliche Skill-Beschreibung (Quellsprache)
Use when migrating files and media safely across buckets, storage providers or key schemas using dual-read/write, checksum verification and zero-downtime cutover.
Installiere den Skill, prüfe seine Quelle und Vertrauenseinstellungen und aktiviere ihn für das passende Projekt oder den Agenten.
Voraussetzungen
- Orqestria auf deinem Computer installiert.
