[BlueOnyx:25838] Re: Easy-Migrate

Michael Stauber mstauber at blueonyx.it
Wed Dec 14 13:18:05 -05 2022


Hi Keith,

> We're doing our final cut over of servers from 5209R to 5210R
> When we do the mysql transfer we noticed it's missing alarge amount of the
> databases
> 
> Most of these were created via Phpadmin  and for some reason they will not
> get dumped in to the /home/.easy-migrate/ folders
> 
> But when we do the dump manually there is a huge size difference
> 
> Manually we get 4,050,618 KB and with easy-migrate we get 36KB
> 
> mysqldump -u root -p --all-databases > /home/.easy-migrate/mysql-all-dbs.sql
> Give us all of the database
> 
> /usr/sausalito/sbin/easy-migrate.pl --source xxx.xxxx.xxxx.xxxx -p 2224
> --mysql only give us 36KB file

When you do a regular Vsite migration this way ...


~]# /usr/sausalito/sbin/easy-migrate.pl --source <IP-of-Source-Server> 
-p 22 --ip <new-ip-of-vsite> --vsites www.site.com

... that will only migrate MySQL databases that are known to the GUI. If 
a Vsite has databases that were created via the GUI? They get migrated 
and put back where the GUI can see them.

If there are manually created databases or databases that were created 
in any other way but the GUI (like via phpMyAdmin), then the above 
migration will not carry them over.

But this *should*:

#> /usr/sausalito/sbin/easy-migrate.pl --source <IP-of-Source-Server> -p 
22 --mysql

Here is the code that does the export:

https://devel.blueonyx.it/trac/browser/BlueOnyx/5209R/utils/easy-migrate/src/easy-migrate/em-helper.pl#L558

At the end of the day this is what it does:

mysqldump -u $mysqlroot -p$mysqlpass --routines --triggers 
--single-transaction --databases $dblist > 
/home/.easy-migrate/mysql-all-dbs.sql

The "--databases $dblist" is generated this way in line 575:

mysql -u $mysqlroot -p$mysqlpass -ANe\"SELECT schema_name FROM 
information_schema.schemata WHERE schema_name NOT IN 
('mysql','test','information_schema','performance_schema','avspam6')\"

So this excludes the specific databases mentioned there, but should get 
all the rest.

I wonder why that is not working for you. FWIW: The script 
"/usr/sausalito/bin/em-helper.pl" resides on the TARGET server of the 
migration and is copied by SCP to the SOURCE server of the migration 
when Easy-Migrate runs. So if you want to make changes to it, do so on 
the server where you want to migrate *to*.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list