Skip to Content

how to create a complete backup of ezeelogin installation?

How do I create a complete backup of my Ezeelogin installation?


 Execute the command /usr/local/sbin/backup_ezlogin.php and this would create a binary executable backup archive in /var/ezlogin_backup_xx_x.bin.

The directory /var/log/ezlogin stores the user SSH sessions that are recorded. This dir could run into a huge size ( 1GB >) which would cause the backup script to take longer to complete ( The log dir has to be tarred and then gzip'ed compressed which is time-consuming and resource intensive).  In such, cases it's advisable to skip the log directory while running the backup script as follows.

[root@vectro ~]#    /usr/local/sbin/backup_ezlogin.php -nologs

[root@vectro ~]# /usr/local/sbin/backup_ezlogin.php

                   _             _      

  ___ _______   ___| | ___   __ _(_)_ __ 

/ _ \_   / _ \/ _ \ |/ _ \ / _` | | '_ \

|   __// /   __/   __/ | (_) | (_| | | | | |

\___/___\___|\___|_|\___/ \__, |_|_| |_|

                        |___/

#########################

#   Ezeelogin Backup     #

#########################

Checking environment... done (1797)

Based on your command line parameters, you may be prompted to enter the missing settings. The default value will be given in bold . Simply pressing enter key will choose the default value.

Creating directories... done (4914)

Copying files... |

done (4986)

Backup database... done (5236)

Backup logs... done (5244)

Creating executable archive...    

########################################################

Ezeelogin backup created: /var/ezlogin_backup_v7.8.0_b381_Thu_Oct_04_2018_09_10_32_UTC.bin

(Log: /var/log/ezlogin_backup.log )

########################################################

For free assistance, please contact [email protected]

 

Thank you for choosing Ezeelogin.

www.ezeelogin.com

--> You may store this backup archive generated in /var/ezlogin_backup.x.x remotely,  in case you need to restore it when your primary node is unrecoverable.
--> When your primary node goes down, all you need is to migrate the license to the new IP from the portal and execute the backup archive on the server and you are ready to go..

To restore ezeelogin , simply execute the archive created.

[root@vectro ~]# /var/ezlogin_backup_v7.8.0_b381_Thu_Oct_04_2018_09_10_32_UTC.bin

Creating directory ezlogin_backup_v7.8.0_b381_Thu_Oct_04_2018_09_10_32_UTC

Verifying archive integrity... All good.

Uncompressing Ezeelogin 7.8.0 backup (Thu_Oct_04_2018_09_10_32_UTC).............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

/ _ \_   / _ \/ _ \ |/ _ \ / _` | | '_ \

|   __// /   __/   __/ | (_) | (_| | | | | |

\___/___\___|\___|_|\___/ \__, |_|_| |_|

                           |___/

#########################

#   Ezeelogin Restore     #

#########################

done (1797)

Required PHP extensions...

mysqli   -> Success

openssl   -> Success

posix   -> Success

pcre   -> Success

json   -> Success

curl   -> Success

mcrypt   -> Success

Required PHP functions...

exec   -> Success

proc_open   -> Success

proc_close   -> Success

fopen   -> Success

fsockopen   -> Success

file   -> Success

file_get_contents   -> Success

escapeshellarg   -> Success

preg_match   -> Success

ini_get   -> Success

Operating system: Linux (x86_64)

PHP version: 5.3.3

done (1863)

Based on your command line parameters, you may be prompted to enter the missing settings. The default value will be given in bold . Simply pressing enter key will choose the default value.

Checking database connectivity.done (3107)

Checking database availability.done (3121)

Review settings:

Install web panel files in                                 : /var/www/html/ezlogin/

Install web panel system files in                         : /var/www/ezlogin/

URI path to access web panel                               : /ezlogin/

MySQL server                                               : localhost

MySQL port/socket                                         : /var/lib/mysql/mysql.sock

Force HTTPS for web panel?                                 : no

Secure MySQL connection?                                   : no

Accept the above settings? ( y /n/x) : y

 

Creating and setting up database... done 

Adding ezsh to shells... done 

Creating group and users... done 

Restoring logs... done

Creating directories... done 

Copying files... |

ERROR copying: setup/crontab -> ezadmin

done 

Setting access...  

done 

Setting file modes

done 

Setting file owners...

done

Setting file groups... 

ERROR chgrp: ezadmin -> root

done

Setting up config... done

Setting up cron... done 

Downloading GeoLiteCity database from www.maxmind.com... /root/ezlogin_backup_v7.8.0_b381_Thu_Oct_04_2018_09_10_32_UTC/setup/setup.php on line

done 

 

########################################################

Ezeelogin restored. (Log: /var/log/ezlogin_restore.log )

########################################################

Please check the log file.

For assistance, please contact support with the content of the log file.

 

###################################################################

Web panel installed at:

  ' /var/www/html/ezlogin/ '

  ( http://yourdomain.com/ezlogin/ ).

###################################################################

 

Note: Please check the log file to see if any error occurred.

 

TODO NOTES:

Enable web server, MySQL server and cron to startup at boot time.

For free assistance, please contact [email protected]

Thank you for choosing Ezeelogin.

www.ezeelogin.com

--> Following shows the help menu for restoring Ezeelogin

root@gateway:# /var/ezlogin_backup_v7.25.4_b381_Fri_Apr_16_2021_17_24_32_IST.bin -- -help
Creating directory ezlogin_backup_v7.25.4_b381_Fri_Apr_16_2021_17_24_32_IST
Verifying archive integrity... All good.
Uncompressing Ezeelogin 7.25.4 backup (Fri_Apr_16_2021_17_24_32_IST)............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................._ ___ _______ ___| | ___ __ _(_)_ __

/ _ \_ / _ \/ _ \ |/ _ \ / _` | | '_ \
| __// / __/ __/ | (_) | (_| | | | | |
\___/___\___|\___|_|\___/ \__, |_|_| |_|
|___/


#########################
# Ezeelogin Restore #
#########################

Options:

-help : Show this help
-www <path> : Path from where web server will serve the web panel files
-sys <path> : Path where web panel will search for its system files
-uri <path> : Request URI path to access the web panel
-dbhost <host> : Specify hostname or IP address of MySQL server
-dbport <port> : Specify the port MySQL server is listening on
-dbsuser <username> : Specify database super (root) user name
-dbspass <password> : Specify database super (root) user password
-force_https <yes/no> : Whether to force HTTPS for web panel
-noauto : Prompt for options
-usebin <absolute_path> : Use the provided binary package instead of downloading
-lic_timeout <seconds> : Timeout for connecting to Ezeelogin license server. Default: 30
-proxy_host <host> : Proxy host for connecting to Ezeelogin license server
-proxy_port <port> : Proxy port for connecting to Ezeelogin license server
-proxy_user <username> : Proxy user for connecting to Ezeelogin license server
-proxy_pass <password> : Proxy pass for connecting to Ezeelogin license server
-mysql_encrypt <yes/no> : Whether to enable secure mysql connection
-mysql_ssl_key <absolute_path> : Path to the private key file for secure MySQL connection
-mysql_ssl_cert <absolute_path> : Path to the public key certificate file for secure MySQL connection
-mysql_ssl_ca <absolute_path> : Path to the certificate authority file for secure MySQL connection
-mysql_ssl_capath <absolute_path> : Path to a directory containing trusted CA certificates for secure MySQL connection
-mysql_ssl_cipher <ciphers> : List of *allowed* ciphers to be used for the encryption, separated by colons (':')
-mysql_ssl_verify <yes/no> : Whether to verify the server certificate for secure MySQL connection

If you want to restore the Ezeelogin database on a different database host you need to specify the DB host, port, etc while restoring.

Following is an example of restoring Ezeelogin on the remote database.

 sh ezlogin_backup_v7.25.4_b381_Fri_Apr_16_2021_17_24_32_IST.bin -- -dbhost 192.168.1.8 -dbport 3306 -dbsuser root -dbspasswd

 

Follow the step below if you want to do the restore in one step with your existing settings and without being prompted.

sh ezlogin_ backup _v7.9.0_b381_Wed_Feb_13_2019_23_26_03_IST.bin    -- -skipgeolite -auto -force -ACCEPT_SETTINGS -I_ACCEPT_EULA

 Replace the backup filename with your backup file.

 

You need to check the  /var/log/ezlogin_backup.log and  /var/log/ezlogin_restore.log to see if any errors occurred during the backup and restore process