System Migration Plan
1. Overview
This document defines the procedures and best practices for migrating the CostOS application and its associated SQL Server databases from one environment or server to another.
CostOS is a self-hosted three-tier application that relies on two databases:
Master Database – stores system configuration, user profiles, roles, and application metadata.
Project Database – stores all project-related data, including cost structures, items, and historical records.
The application server is deployed via the official CostOS installer provided by the vendor.
Since all business-critical data resides in these databases, successful migration ensures full operational recovery and data integrity.
2. Objectives
2.1 Purpose
To ensure a secure, reliable, and repeatable process for migrating CostOS (including both databases) to a new environment or server, maintaining full data consistency and minimal downtime.
2.2 Scope
This plan applies to:
Migration between servers or environments (e.g., hardware refresh, data center move).
Upgrading to a new application version.
Consolidation or separation of database servers.
It covers:
Backup and restoration of both Master and Project databases.
Reinstallation of the CostOS application using the official installer.
Configuration and validation in the target environment.
3. System Components
Component | Description | Backup/Migration Action |
|---|---|---|
Master Database | Contains system configuration, user accounts, permissions, roles, and environment metadata. | Backup and restore on target SQL Server. |
Project Database | Stores all project data, cost models, and related information. | Backup and restore on target SQL Server. |
Application Server | Web and middleware layer provided via official CostOS installer. | Fresh install and configuration on target server. |
Configuration Files | Contains database connection strings, encryption keys, and SSL certificates. | Export and restore during migration. |
Operating System | Host environment for the application and SQL Server. | Reinstall or prepare as required. |
4. Pre-Migration Preparation
4.1 Planning
Define the migration schedule and downtime window.
Identify source and target environments (hostnames, IPs, SQL Server versions).
Verify that both SQL Server instances use compatible collation and version levels.
Notify users and freeze changes in CostOS during migration.
4.2 Backup
Perform the following for both Master and Project databases:
Execute a full database backup:
BACKUP DATABASE [CostOS_Master] TO DISK = 'D:\Backups\CostOS_Master_Full.bak' WITH INIT, COMPRESSION; BACKUP DATABASE [CostOS_Project] TO DISK = 'D:\Backups\CostOS_Project_Full.bak' WITH INIT, COMPRESSION;Verify the integrity of both backups:
RESTORE VERIFYONLY FROM DISK = 'D:\Backups\CostOS_Master_Full.bak'; RESTORE VERIFYONLY FROM DISK = 'D:\Backups\CostOS_Project_Full.bak';Export and securely store:
Application configuration files (
config.properties,appsettings.json, etc.)Encryption keys (if used for data protection)
SSL/TLS certificates
4.3 Pre-Migration Validation
Confirm both databases are healthy (
DBCC CHECKDB).Ensure sufficient disk space and permissions on target servers.
Validate that the target SQL Server version is compatible with CostOS.
5. Migration Process
Step 1 – Prepare Target Environment
Install or provision the target SQL Server instance.
Install the required operating system and application dependencies.
Verify network connectivity between the application server and the SQL Server.
Step 2 – Restore Databases
Copy the verified backup files to the target SQL Server.
Restore both databases:
RESTORE DATABASE [CostOS_Master] FROM DISK = 'D:\Backups\CostOS_Master_Full.bak' WITH MOVE 'CostOS_Master_Data' TO 'D:\MSSQL\Data\CostOS_Master.mdf', MOVE 'CostOS_Master_Log' TO 'D:\MSSQL\Logs\CostOS_Master.ldf', REPLACE; RESTORE DATABASE [CostOS_Project] FROM DISK = 'D:\Backups\CostOS_Project_Full.bak' WITH MOVE 'CostOS_Project_Data' TO 'D:\MSSQL\Data\CostOS_Project.mdf', MOVE 'CostOS_Project_Log' TO 'D:\MSSQL\Logs\CostOS_Project.ldf', REPLACE;Verify both restorations using:
DBCC CHECKDB('CostOS_Master'); DBCC CHECKDB('CostOS_Project');Ensure database users and permissions are consistent between the two databases (e.g., linked logins or roles).
Step 3 – Install Application Server
Run the CostOS installer on the target server.
Follow installation prompts and complete deployment.
Update configuration files to point to the new database locations:
CostOS_Masterconnection stringCostOS_Projectconnection string
Apply SSL certificates and encryption keys if required.
Start the CostOS services and verify connections.
Step 4 – Synchronize and Test
Confirm that the application connects successfully to both databases.
Test login, user management, and project loading functions.
Verify read/write operations to ensure both databases are accessible and operational.
6. Post-Migration Validation
6.1 Functional Testing
Perform the following:
User authentication (LDAP/Kerberos/SAML).
Project creation, modification, and save operations.
Data retrieval across modules.
Administrative actions from the Master database.
Reports and exports.
6.2 User Acceptance Testing (UAT)
Have key users validate project data and system behavior.
Record feedback and confirm sign-off from stakeholders.
7. Rollback Plan
If migration fails or inconsistencies occur:
Stop activity in the target environment.
Restore service in the original environment using the original databases.
Notify stakeholders and document the issue.
Correct the root cause and reschedule migration.
8. Documentation and Logs
Maintain:
Backup file names, paths, and checksums.
Migration and restoration logs.
Verification and UAT results.
Change approval and rollback documentation.
All documents must be stored in the IT change management system.
9. Responsibilities
Role | Responsibilities |
|---|---|
Database Administrator (DBA) | Perform backup, restore, and verification for both databases. |
System Administrator | Install CostOS and configure connections to both databases. |
Security Officer | Verify permissions, encryption, and SSL configuration. |
IT Manager | Approve migration schedule, oversee testing, and sign-off completion. |
10. Acceptance Criteria
Migration is considered successful when:
Both Master and Project databases are fully restored and accessible.
The CostOS application connects correctly to both databases.
All users, projects, and configurations are intact.
No critical errors are found in system logs.
UAT sign-off is received.
11. Post-Migration Activities
Initiate the first full backup on the new environment.
Update backup schedules and monitoring.
Validate Syslog or SIEM integration for new servers.
Decommission or archive the old environment after stability confirmation.
12. Conclusion
The CostOS migration process ensures full continuity by securely transferring both the Master Database and Project Database to the target environment, reinstalling the application via the official installer, and re-establishing all system connections.
Following this documented procedure guarantees:
100% data retention
Full operational recovery
Minimal downtime
Controlled and auditable migration process