Storage Migration Guide
This guide explains how to migrate data between storage providers in BFFless.
Overview
BFFless supports migrating data between any combination of storage providers:
- Local filesystem
- MinIO
- AWS S3 (and S3-compatible services)
- Google Cloud Storage
- Azure Blob Storage
Before You Start
Pre-Migration Checklist
- Backup your data - Always maintain a backup before migration
- Verify target credentials - Test connection to new provider
- Estimate migration time - Large datasets take longer
- Schedule downtime - Migration may affect availability
- Check storage costs - Understand pricing of new provider
- Verify disk space - Ensure target has sufficient capacity
Migration Time Estimates
| Data Size | Estimated Time | Notes |
|---|---|---|
| < 1 GB | 1-5 minutes | Quick migration |
| 1-10 GB | 5-30 minutes | Plan for brief downtime |
| 10-100 GB | 30 min - 3 hours | Schedule maintenance window |
| > 100 GB | 3+ hours | Consider off-peak migration |
Times vary based on:
- Network speed between source and target
- File count (many small files are slower)
- Storage provider performance
- Concurrency settings
Migration Process
Step 1: Configure New Provider
- Navigate to Settings → Storage
- Click Change Provider
- Select your new storage provider
- Enter configuration details
- Click Test Connection (does not start migration)
Step 2: Review Migration Scope
After successful connection test:
- Review the migration summary:
- Total file count
- Total data size
- Estimated migration time
- Verify source and target providers are correct
Step 3: Start Migration
- Click Start Migration
- Confirm the migration in the dialog
The migration runs in the background. You can:
- Monitor progress in the UI
- Continue using BFFless (with degraded performance)
- Cancel if needed
Step 4: Monitor Progress
The migration screen displays:
| Metric | Description |
|---|---|
| Files Migrated | X / Total files transferred |
| Data Transferred | X GB / Total GB |
| Elapsed Time | Time since migration started |
| Estimated Remaining | Approximate time to completion |
| Current File | File currently being migrated |
| Errors | Count of failed files |
Step 5: Verify and Complete
After migration completes:
- Verify file counts match - Source and target should have same count
- Test a few deployments - Access some files to verify
- Check presigned URLs work - Test download links
- Click Complete Migration to switch to new provider
Migration Options
Concurrency
Control how many files are transferred simultaneously:
| Value | Use Case |
|---|---|
| 1-3 | Rate-limited providers, slow networks |
| 5 | Default, balanced performance |
| 10-20 | Fast networks, high-performance storage |
Integrity Verification
Enable checksum verification (recommended) to compare MD5/ETag after each file transfer to ensure data integrity.
Continue on Error
Control behavior when individual files fail:
true: Skip failed files, continue migrationfalse: Stop migration on first error
Rollback
Before Completion
If migration is in progress or paused:
- Click Cancel Migration
- Original data remains intact
- Delete incomplete data on target (optional)
After Completion
If you've completed migration but need to rollback:
- Navigate to Settings → Storage
- Click Change Provider
- Select your original provider
- Enter original configuration
- Start a new migration back to original
Original data must still exist for rollback to work.
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
| Connection Failed | Network or credential issues | Verify credentials and connectivity |
| Access Denied | Insufficient permissions | Check IAM roles/policies |
| Quota Exceeded | Target storage full | Increase quota or cleanup |
| Rate Limited | Too many requests | Reduce concurrency |
| Timeout | Slow network or large file | Increase timeout, retry |
Failed Files
If some files fail to migrate:
- Check the error log in migration details
- Common causes:
- Corrupted source files
- Permission issues
- Network timeouts
- After fixing issues, you can:
- Retry failed files manually
- Re-run migration (already migrated files are skipped)
Best Practices
Planning
- Test with small dataset first - Use prefix filter to migrate one repo
- Schedule during low traffic - Minimize impact on users
- Notify users - Communicate maintenance window
- Have rollback plan - Keep original data accessible
During Migration
- Monitor progress - Watch for errors
- Don't restart BFFless - Migration state is in memory
- Minimize writes - New uploads may not be migrated
- Keep terminal open - If running manually
After Migration
- Verify thoroughly - Test multiple deployments
- Monitor for issues - Watch logs for errors
- Keep original data - Don't delete until confident
- Update documentation - Record new provider details
Migration Scenarios
Local to Cloud
Migrating from local filesystem to cloud storage:
- Set up cloud provider (S3/GCS/Azure)
- Create bucket/container
- Configure credentials
- Start migration
- Verify all files accessible via presigned URLs
Between Cloud Providers
Migrating between cloud providers (e.g., S3 to GCS):
- Data transfers via BFFless server
- Consider network egress costs
- May take longer due to double network transfer
- Consider direct cloud-to-cloud tools for large datasets
Cloud to Self-Hosted
Migrating from cloud to MinIO or local:
- Ensure sufficient local storage
- Network bandwidth is key factor
- No egress costs after migration
- Consider data sovereignty requirements
Troubleshooting
Migration Stuck
If migration appears stuck:
- Check current file in progress (might be large)
- Check network connectivity
- Check source/target storage health
- View logs for errors
- Consider reducing concurrency
Out of Memory
If BFFless runs out of memory during migration:
- Reduce concurrency
- Restart BFFless and resume migration
- Increase server memory
- Split migration into smaller batches using prefix filter
Data Mismatch
If file counts don't match after migration:
- Check error log for failed files
- Re-run migration (already migrated files are skipped)
- Manually migrate failed files
- Compare file listings from both sources