Skip to Content

Is there a way to dump the configuration of the server into a file?

How to dump the configuration of the server into a file?


Overview: This article outlines the steps to dump the server configuration into a file, including creating a full Ezeelogin backup, manually backing up configuration files and the database, and addressing potential MySQL access issues.


The recommended way is to take the entire backup of the Ezeelogin. Refer the article to create a complete backup of Ezeelogin.

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.

:~# /usr/local/sbin/backup_ezlogin.php -nologs


Make sure to back up /var/log/ezlogin when you backup ezeelogin with the nologs option.

:~# cp -pr /var/log/ezlogin /var/log/ezlogin_backup

If you want to manually backup, refer the below steps

Step 1. Take the backup of the config file /usr/local/etc/ezlogin/ez.conf and the dir /usr/local/etc/ezlogin/

cp /usr/local/etc/ezlogin/ez.conf /path/to/backup_ez.conf

cp -r /usr/local/etc/ezlogin/ /path/to/backup_ezlogin/

Step 2. Copy the directory /usr/local/etc/ezlogin/ to the server you want it to be restored.

Step 3. Take the backup of the database using mysqldump. Refer 1st and 2nd steps of the article for Ezeelogin database backup and restore.

Note: 

If you are getting the following error "Database connect failed: Access denied for user 'ezlogin_urk'@'localhost' (using password: YES)", run the following command to grant privileges manually.

Login to MySQL as root and replace with your Ezeelogin database credentials. To get Ezeelogin database credentials you can refer the article to retrieve Ezeelogin database credentials

root@gateway:~# mysql -u root -p

mysql> grant all on  ezeelogin_dbname.* to 'ezlogin_dbusername'@'%' identified by 'ezeelogin_dbusername_password' ;

mysql>  flush privileges;


Related Articles:

Extract Ezeelogin backup file

How to change the default backup directory of Ezeelogin installation ?

How can we upgrade PHP in an Ezeelogin installed server ?

How to retreive db credentials?