feat(storage): add MinIO to filesystem migration tool #137
Reference in New Issue
Block a user
Delete Branch "feat/migrate-storage-tool"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Standalone migration tool that downloads all files from MinIO and writes them to the local filesystem, enabling MinIO to be decommissioned from the production deployment.
Changes
cmd/migrate-storage/main.go— one-shot migration binarymigrate-storageMakefile target.gitignoreHow It Works
Queries all file references from three sources in PostgreSQL:
revisions.file_key)item_files.object_key)items.thumbnail_key)Downloads each from MinIO and writes to the local filesystem, mirroring the MinIO key structure as paths under a configurable root directory. No DB updates needed since the keys map directly to filesystem paths.
Features
--dry-runto preview without downloading--verbosefor per-file loggingUsage
Testing
go build ./cmd/migrate-storage-hflag shows usage-dry-runvalidates DB queries and lists files without downloading