MySqlBackupNET/MySqlBackup.Net

Exception when trying to back up tables with more than 2GB

adrbarros opened this issue · 8 comments

Hello.

I have a database running since 2008, some tables are very large, between 2 to 4.5 GB and the total database has 19GB, is currently in a Server Linux Centos 8 32GB RAM, the MySQL versions have been evolving and being migrated with Over the years, starting in version 5.1 and currently in version 8.

Using the library, when backing up the database, when it starts backing up the larger tables occurs Timeout errors, it is not always in the same table. I've increased the timeout and yet persists in these mistakes.

Does anyone have any tips, not to happen this kind of exception when performing the backup using the library?

Note: Backup via command line, it works perfectly.
Example of the command used via command line:
mysqldump -u USET -pPASS DATABASE - -adddrop -database - -adddrop -table -x -a -e -k -r -b> directory\backup_database_yyymddhmmm.sql

Have you tried the connection string option of ConnectionTimeout

Server=yourserver;Database=yourdatabase;User ID=youruserid;Password=yourpassword;ConnectionTimeout=60;

Where did you execute mysqldump and mysqlbackup.net?
Were they run on the same machine as the MySQL server?
Try running mysqlbackup.net on the same machine as the MySQL server.
If you are running mysqlbackup.net on a different machine, try to ensure the stability of the connection between both machines (the MySQL server and the machine that runs mysqlbackup.net).

Backup or executed with MySQLBackup.net, I already set up the Timeout on the connection string, and using MySQLBackup.net happens the exception (error when backing on tables with over 2GB)

Scenario:
MySQL server is a centos 8 with 32GB RAM

Backup application is on a Windows 2019 server, developed in .net Windows Forms

Which section raised the timeout exception? Do you have a screenshot of the error? Can you post the full error message?

If the timeout is raised by the WinForms UI operation, then you can use a background worker to run MySQLBackup.net on a separate thread. Then, you can execute MySQLBackup.net for as long as you need.

*Just a side note, MySqlBackup.NET can run on CentOS, if you wish to. You can read my blog for instructions of running MySqlBackup.net on CentOS: https://adriancs.com/c-sharp-mysql/332/run-mysqlbackup-net-on-centos/

The Connection Timeout I already define at 60, 6000, 60000, 600000
My application is performed in backgroud, but always generates the same error.

Now I tested with the test solution that is in Github, and also the same error.

image

I see, can you try again with MySqlConnector instead:
https://www.nuget.org/packages/MySqlBackup.NET.MySqlConnector/

you can write a simple small app just for this testing

If you using the demo test app from github, you may use the function of "Progress Report - Export":

This function is run by using Background Worker, which runs MySqlBackup.net in a separate thread.

MySqlBackup Test App - Progress Report Export

Using the 2 (mysql.data or mysqlconnector) connectors, it fires the same exception.

I will perform other tests, because with mysqlconnector the exception occurred in the last table that contains a lot of data, in this case I think increasing the timeout can resolve

Thank you for your help.

image