Hi,
Got 5.0 Zabbix server on Ubuntu 18.04, with MySQL 5.7. The new server is already fully configured, with all the configuration moved and Zabbix 6.0 running and tested.
I just thought moving the would be the last final piece, cherry on pie - I was so wrong.
The database has 100GB in size
Size checked with command:
mysql> SELECT table_schema "zabbix",ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
+--------------------+---------------+
| zabbix | DB Size in MB |
+--------------------+---------------+
| information_schema | 0.2 |
| mysql | 3.9 |
| performance_schema | 0.0 |
| sys | 0.0 |
| zabbix | 103325.4 |
+--------------------+---------------+
5 rows in set (1.07 sec)
Made a dump with command - when the zabbix service was stopped (just in case):
mysqldump -uroot -p --single-transaction --quick --lock-tables=false zabbix | gzip > /dbdump/dumps/ZabbixDB_Backup.gz
The dump has about 6GB.
Tried to do a dump import on the new machine, but it takes like hours to import like, the whole database I think would be importing for 2 days.
I am doing a test and made a machine with MySQL 5.7 - the import goes much faster!
So I have read a bit about it, and performed following changes on the target machine:
In SQL:
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, AUTOCOMMIT = 0;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
And
create /etc/mysql/conf.d/disable_binary_log.cnf with the following contents:
[mysqld]
skip-log-bin
+ restart of MySQL.
Still no changes. Import takes ages. Am I the only person struggling with such issue or it is simply like this and nothing can be done?
Any ides much appreciated as I am out of ideas currently. The only idea maybe is to import tht database to the "middle server" with MySQL 5.7 where import goes much faster, upgrade the database to 8.0 and move database files to another server, or - if that fails - try to import the mysqldump from 8.0 to 8.0 (might be faster).
J
Got 5.0 Zabbix server on Ubuntu 18.04, with MySQL 5.7. The new server is already fully configured, with all the configuration moved and Zabbix 6.0 running and tested.
I just thought moving the would be the last final piece, cherry on pie - I was so wrong.
The database has 100GB in size
Size checked with command:
mysql> SELECT table_schema "zabbix",ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
+--------------------+---------------+
| zabbix | DB Size in MB |
+--------------------+---------------+
| information_schema | 0.2 |
| mysql | 3.9 |
| performance_schema | 0.0 |
| sys | 0.0 |
| zabbix | 103325.4 |
+--------------------+---------------+
5 rows in set (1.07 sec)
Made a dump with command - when the zabbix service was stopped (just in case):
mysqldump -uroot -p --single-transaction --quick --lock-tables=false zabbix | gzip > /dbdump/dumps/ZabbixDB_Backup.gz
The dump has about 6GB.
Tried to do a dump import on the new machine, but it takes like hours to import like, the whole database I think would be importing for 2 days.
I am doing a test and made a machine with MySQL 5.7 - the import goes much faster!
So I have read a bit about it, and performed following changes on the target machine:
In SQL:
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, AUTOCOMMIT = 0;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
And
create /etc/mysql/conf.d/disable_binary_log.cnf with the following contents:
[mysqld]
skip-log-bin
+ restart of MySQL.
Still no changes. Import takes ages. Am I the only person struggling with such issue or it is simply like this and nothing can be done?
Any ides much appreciated as I am out of ideas currently. The only idea maybe is to import tht database to the "middle server" with MySQL 5.7 where import goes much faster, upgrade the database to 8.0 and move database files to another server, or - if that fails - try to import the mysqldump from 8.0 to 8.0 (might be faster).
J
Comment