Migratie Documentatie
MigratieDocument 2024: Stappenplan
In dit document wordt uitgelegd hoe het migratieproces in zijn werking gaat. Voor alleen de Web to Web migratie kun je het document "Web To Web migration" gebruiken. Dit document legt uit hoe de migratietool gebruikt kan worden om een lege omgeving op te zetten in onze twee omgevingen (Acceptatie & Productie).
Voorbereidingen
Zorg dat je eerst de volgende onderdelen op je computer hebt staan:
- Putty: Wordt gebruikt om een tunnel op te zetten naar de gewenste omgeving.
- SQL Management Studio
- Powershell
- MYSQL Workbench: Met een werkende connectie naar beide omgevingen.
- Een lege database: Deze is te vinden in de netwerkmap
Acousoft/SupportDesk/Lege databases.
Stap 1: Restore de lege database
- Open SQL Management Studio.
- Klik met de rechtermuisknop op 'Databases' en kies 'Restore Database'.
- Gebruik de
Leeg2022.bakfile. - Geef de database een naam, bij voorkeur de naam van de klant.
Stap 2: Tunnel opzetten met Putty
- Open Putty.
- Kies de acceptatieomgeving en klik op 'Load'.
- Klik in het rechtermenu op het + teken naast SSH.
- Ga naar het menu om een tunnel in te stellen.
- Voor de acceptatieomgeving gebruik je de source poort
23306. - Voer als adres in:
localhost:3306.
- Voor de acceptatieomgeving gebruik je de source poort
- Klik op de knop 'Add'.
- Selecteer de tunnel en klik op 'Open'.
- Een inlogscherm wordt geopend. Gebruik de inloggegevens die bij de acceptatieomgeving horen (te vinden in Keepass onder
2241).
Stap 3: Migratietool starten via IIS
- Start de migratietool via IIS.
- Ga naar de site
Migratie.acousoft.lan. - Log in met je gebruikersnaam en wachtwoord.
- Kies de server (bijvoorbeeld
Carlito\sqlexpress). - Kies de naam van de database (naam van de klant).
- Voer je gebruikersnaam en wachtwoord in.
- Klik op de knop 'Controleer databases'. De tool zal aangeven of de connectie geslaagd is.
Stap 4: Migratie uitvoeren
- Als de connectie geslaagd is, kies je tussen een Pilot migratie (acceptatie) of definitieve migratie (productie).
- Voor een nieuwe klant kies je voor productie.
- Een scherm met een progressiebalk zal openen en blijft hangen op 4%.
- Open Powershell.
- Gebruik het commando:
Dit zal ervoor zorgen dat de migratie daadwerkelijk start.php artisan queue:work
Stap 5: Afronden van de migratie
- Als de migratie klaar is, zal er een scherm verschijnen met de inloggegevens.
- Noteer deze in Keepass.
- Geef de inloggegevens door aan de klant.
- De migratie is nu klaar.
Extra stappen voor meerdere klanten op dezelfde database
- Als er twee klanten op dezelfde database zitten, volg je hetzelfde proces met enkele extra stappen.
- Na een succesvolle migratie heb je een nieuwe lege omgeving aangemaakt.
- Gebruik de Web to Web migratie om de data van één van de twee bedrijven over te zetten naar de nieuw aangemaakte database.
Migration Document 2024: Step-by-Step Guide
This document explains the migration process. For Web to Web migration only, refer to the "Web To Web Migration" document. This guide details how to use the migration tool to set up an empty environment in both Acceptance and Production environments.
Preparations
Ensure you have the following tools installed on your computer:
- Putty – Used to set up a tunnel to the target environment.
- SQL Management Studio
- PowerShell
- MySQL Workbench – With a working connection to both environments.
- An empty database – Available in the network folder:
Acousoft/SupportDesk/Lege databases.
Step 1: Restore the Empty Database
- Open SQL Management Studio.
- Right-click on Databases and select Restore Database.
- Use the file Leeg2022.bak.
- Name the database, preferably after the customer.
Step 2: Set Up a Tunnel with Putty
- Open Putty.
- Select the Acceptance environment and click "Load".
- Expand SSH in the right menu and navigate to Tunnels.
- Set up the tunnel:
- Source port:
23306(for Acceptance). - Destination:
localhost:3306.
- Source port:
- Click "Add", then select the tunnel and click "Open".
- A login screen appears. Use the Acceptance environment credentials (found in Keepass under
2241).
Step 3: Start the Migration Tool via IIS
- Start the migration tool via IIS.
- Go to Migratie.acousoft.lan.
- Log in using your username and password.
- Select the server (e.g.,
Carlito\sqlexpress). - Choose the database name (customer's name).
- Enter your username and password.
- Click "Check Databases" – the tool will confirm if the connection is successful.
Step 4: Execute the Migration
- If the connection is successful, choose between:
- Pilot migration (Acceptance).
- Final migration (Production, for new customers).
- A progress bar will appear and pause at 4%.
- Open PowerShell and run the following command: powershell
php artisan queue:work - This command initiates the actual migration.
Step 5: Finalizing the Migration
- Once migration is complete, a screen will display the login credentials.
- Save the credentials in Keepass.
- Share the login details with the customer.
- Migration is now complete.
Additional Steps for Multiple Customers on the Same Database
- If two customers share the same database, follow the same process with some additional steps.
- After successful migration, a new empty environment is created.
- Use the Web to Web migration to transfer data from one of the companies to the newly created database.
By following these steps, you can ensure a smooth migration process.