User Tools

Site Tools


migrating_mariadb_database_from_lxc_to_docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
migrating_mariadb_database_from_lxc_to_docker [2024/11/02 04:33] – [3. Ensure Backup File Availability in Docker Container] osomigrating_mariadb_database_from_lxc_to_docker [2024/11/02 04:36] (current) oso
Line 8: Line 8:
  
  
-  Connect to the LXC instance running MariaDB (in this example, ''api.facundoitest.space'') and create a backup using ''mysqldump''. Replace ''facundo'' with your username and ''VeeamReports'' with your database name:+  Connect to the LXC instance running MariaDB (in this example, ''api.facundoitest.space'') and create a backup using ''mysqldump''. Replace ''facundo'' with your username and ''VeeamReports'' with your database name:
  
 <code> <code>
Line 14: Line 14:
 </code> </code>
  
-  This command creates a backup file named ''veeamreports.bak'' in the current directory.+  This command creates a backup file named ''veeamreports.bak'' in the current directory.
  
 ==== 2. Copy the Backup to Docker Host ==== ==== 2. Copy the Backup to Docker Host ====
  
  
-  From your local machine or the LXC instance, use ''scp'' to transfer the backup file to the Docker host (e.g., ''racknerd-vpn.facundoitest.space''):+  From your local machine or the LXC instance, use ''scp'' to transfer the backup file to the Docker host (e.g., ''racknerd-vpn.facundoitest.space''):
  
 <code> <code>
Line 25: Line 25:
 </code> </code>
  
-  This will place the file in ''/home/facundo/sql-migration/'' on the Docker host.+  This will place the file in ''/home/facundo/sql-migration/'' on the Docker host.
  
 ==== 3. Ensure Backup File Availability in Docker Container ==== ==== 3. Ensure Backup File Availability in Docker Container ====
Line 50: Line 50:
  
  
-  With the backup file accessible in the container, import it into the MariaDB instance by connecting to the container:+  With the backup file accessible in the container, import it into the MariaDB instance by connecting to the container:
  
 <code> <code>
Line 56: Line 56:
 </code> </code>
  
-   Run the following command to import the database. ''VeeamReports'' is the database name and ''facundo'' the user:+  * Run the following command to import the database. ''VeeamReports'' is the database name and ''facundo'' the user:
  
 <code> <code>
Line 64: Line 64:
 ==== 5. Verify the Import ==== ==== 5. Verify the Import ====
  
-  Confirm that the database imported successfully by connecting to MariaDB and checking for tables in ''VeeamReports'':+  Confirm that the database imported successfully by connecting to MariaDB and checking for tables in ''VeeamReports'':
  
 <code> <code>
Line 73: Line 73:
 Notes Notes
  
-  **Permissions**: Ensure ''facundo'' has the necessary permissions on both the source and destination databases. +  **Permissions**: Ensure ''facundo'' has the necessary permissions on both the source and destination databases. 
-  **Container Access**: If ''mariadb'' is not recognized, try ''mysql'' or confirm the correct executable name for MariaDB in your setup.+  **Container Access**: If ''mariadb'' is not recognized, try ''mysql'' or confirm the correct executable name for MariaDB in your setup.
migrating_mariadb_database_from_lxc_to_docker.1730522007.txt.gz · Last modified: 2024/11/02 04:33 by oso