This repository contains a robust Database Migration Automation system built using C# and .NET. The project is designed to migrate over 1 million records from SQL Server to PostgreSQL with unparalleled efficiency, leveraging Docker containers, multi-threading, and automation tools like Hangfire.
- Simultaneous fetching and pushing of records.
- Completes migration of over 1 million records within a minute.
- Ensures high efficiency and rapid execution.
- The migration process is designed to handle record requests simultaneously.
- Ensures uninterrupted access to records even during migration.
- Real-time monitoring of the migration pipeline.
- Provides detailed insights into task statuses and logs.
- Automatic periodic backups using a multi-threaded approach.
- Triggers backups after every significant database update.
- Facilitates rollback to previous versions for enhanced reliability.
- Cross-platform compatibility (Windows, macOS, Linux).
- Extensibility with custom types and plugins.
- Superior performance for complex queries and large datasets.
-
Dockerized Environments
- SQL Server: Containerized instance hosting the source database.
- PostgreSQL: Containerized instance as the target database.
-
Migration Pipeline
- Written in C# and .NET.
- Implements automation for data migration.
-
Monitoring
- Hangfire dashboard for tracking migration and backup processes.
Feature | PostgreSQL | SQL Server |
---|---|---|
Developer | Open-source, community-maintained | Microsoft Corporation |
License | Free and open-source | Proprietary |
Platform | Cross-platform | Windows/Linux |
Advanced Features | JSON, arrays, full-text search | Business application-oriented |
Performance | Optimized for complex queries | High-throughput transactions |
Extensibility | Highly extensible | Less extensible |
Popularity | Preferred by developers/startups | Corporate environments |
- Pull the required Docker images for SQL Server and PostgreSQL.
- Configure the containers with sample databases.
- Update the connection strings for SQL Server and PostgreSQL in the pipeline.
- Specify additional settings such as backup intervals and rollback policies.
- Launch the migration via Hangfire.
- Monitor progress through the dashboard.
- Use AWS EC2 for storing incremental backups.
- Automatically trigger backups after significant updates.
-
Clone the repository:
git clone https://github.com/yourusername/database-migration-automation.git
-
Build and run Docker containers:
docker-compose up -d
-
Configure the connection settings in
appsettings.json
. -
Run the migration pipeline:
dotnet run
-
Access the Hangfire dashboard at
http://localhost:5000/hangfire
.
- Hangfire Dashboard: Provides a visual representation of all tasks.
- Logs: Captures detailed execution logs for debugging and auditing purposes.
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a feature branch.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any queries, feel free to reach out:
- Email: pvbcod@gmail.com
- GitHub: PVBGEEK
Thank you for exploring the Database Migration Automation project!