Migration Procedures¶
This document provides detailed procedures for migrating between different storage strategies and configurations.
Overview¶
The Open Host Factory Plugin supports migration between different storage backends and configuration formats. This guide covers:
- Storage strategy migration
- Configuration format migration
- Data backup and recovery
- Rollback procedures
Storage Strategy Migration¶
Supported Migrations¶
The plugin supports migration between:
- JSON file storage <-> SQLite database
- Single file <-> Multi-file storage
- Local storage <-> Network storage
Migration Command¶
Use the built-in migration command:
# Migrate from JSON to SQLite
ohfp storage migrate --source json --target sqlite
# Migrate with backup
ohfp storage migrate --source json --target sqlite --backup
Pre-Migration Checklist¶
Before starting migration:
-
Backup existing data
-
Stop active operations
- Ensure no active machine requests
-
Stop any scheduled operations
-
Verify source data integrity
Migration Steps¶
-
Prepare target storage
-
Run migration
-
Verify migration
-
Update configuration
Post-Migration Verification¶
After migration:
-
Test basic operations
-
Verify data integrity
-
Test provider operations
Configuration Migration¶
Legacy Configuration Support¶
The plugin maintains backward compatibility with legacy configuration formats while supporting new formats.
Migration Tools¶
Use configuration migration tools:
# Convert legacy config
ohfp config migrate --from legacy --to current
# Validate migrated config
ohfp config validate
Rollback Procedures¶
If migration fails or issues arise:
- Stop the application
- Restore from backup
- Revert configuration changes
- Restart with original settings
Troubleshooting¶
Common migration issues:
- Data corruption: Use backup and retry
- Permission errors: Check file permissions
- Storage conflicts: Ensure target storage is empty
- Configuration errors: Validate configuration syntax
Best Practices¶
- Always create backups before migration
- Test migration in non-production environment first
- Monitor system during migration
- Have rollback plan ready
- Document migration steps and results