Skip to Content

How to migrate the custom server fields from Ezeelogin version 7.0 to the latest version?

How to migrate the custom server fields and server field values?

1. Take the  backup of old Ezeelogin version 7 and untar the backup using the following command: 

[email protected] :~ sh ezlogin_backup_v7.0.0_b381_Tue_Jul_14_2020_05_32_45_UTC.bin --noexec --keep --target temp

  2. Log into the MySQL as root and then create a test database

[email protected]:~ mysql -u root -p

mysql> create database test;

3. Restore the Ezeelogin database to the test database

[email protected]:~  cd temp/ 

[email protected]:~  mysql test < database.sql -p

You should truncate the server_fields and server_field_values table before importing the data by using the following queries: 

mysql > TRUNCATE ezeelogindatabaseLatest_name.dbprefix(latest)_server_fields;

 mysql> TRUNCATE ezeelogindatabaseLatest_name.dbprefix(latest)_server_field_values;

 

 4. Login to your MySQL as root and update the following query to copy the server fields 

[email protected]:~ mysql -u root -p

mysql > INSERT INTO latest_ezeelogindatabasename.dbprefix(latest)_server_fields (id,name,type,options,description,encrypted,sortorder,created,mtime) SELECT  id,name,type,options,description,encrypted,sortorder,created,mtime FROM ezeeloginversion7databasename.dbprefixezverion7_server_fields;

5.  Login to your MySQL as root and update the following query to copy the server field values

[email protected]:~ mysql -u root -p 

mysql > INSERT INTO latest_ezeelogindatabasename.dbprefix(latest)_server_field_values SELECT * FROM ezeeloginversion7database name.dbprefixezeeloginverion7_server_field_values;

  

Replace latest_ezeelogindatabase with the name of latest Ezeelogin version database name and ezeeloginversion7databasename with the database name of Ezeelogin version 7 .