Backing up the configuration
You need to back up on the configuration file from the GUI.
- Open the web console.
- Go to Administration > Import/Export.
- Click the Export button to export the configuration file.
This exported configuration file contains the previous configuration settings.
Backing up the whole configuration
An easy way to back up whole configuration is to export the CDT log from the GUI. This configuration file is the Config_Files_xxxx.dat file that is found in the Event2 folder.
- Open the web console.
- Navigate to Administration > Export Debugging Files and export the CDT log.
The password for the exported CDT log is "trend".
Backing up the database
The pg_dump command can be used to back up or create a dump of the existing database.
For example, to create a dump of the IMSS database in the /tmp/imss_dump.gz compressed file, use the command:
# /opt/trend/imss/PostgreSQL/bin/pg_dump imss -U sa | gzip > /tmp/imss_dump.gz
To create a dump of the IMSS EUQ database use the command:
# /opt/trend/imss/PostgreSQL/bin/pg_dump imsseuq -U sa | gzip > /tmp/imsseuq_dump.gz
Backing up files
Use the following commands to back up:
Files
IMSVA queued/quarantined/archived mails
# cd /var/app_data
# tar zcvf queue.tar.gz /var/app_data/imss/queue
Log Files
# tar zcvf log.tar.gz /var/app_data/imss/log
Postfix Queued Mails
# tar zcvf deferred.tar.gz /var/spool/postfix/deferred
Recovering the configuration
To recover the previous configuration settings:
- Open the web console.
- Go to Administration > Import/Export and import the backed up configuration file.
The following configuration files that were previously backed up can also be restored if needed:
- /opt/trend/imss/config/imss.ini (Located in the CDT log .\Event1 folder)
- /opt/trend/imss/postfix/etc/postfix/main.cf & master.cf (Located in the CDT log .\Event5 folder)
Recovering the database
If you want to install a new IMSVA server using the older IMSVA server's database and settings, you can do the following to recover the old database with its previous settings:
- Stop the IMSVA services using the command:
# /opt/trend/imss/script/imssstop.sh
- Start the database service using the command:
# /opt/trend/imss/script/dbctl.sh start
- Run the command:
# cd /opt/trend/imss/PostgreSQL/bin
- Drop the IMSS database using the command:
# ./dropdb -U sa imss
- Create a new IMSS database using the command:
# ./createdb -U sa imss
- Import the dumped IMSS database into the newly created IMSS database using the command:
# gunzip -c /tmp/imss_dump.gz | psql imss -U sa
- Start the IMSVA services using the command:
# /opt/trend/imss/script/imssstart.sh
Recovering Files
To recover files:
- Stop the IMSVA services using the command:
# /opt/trend/imss/script/imssstop.sh
- Copy the backed up folders into the Related folders.
- Start the IMSVA services using the command:
# /opt/trend/imss/script/imssstart.sh
For Postfix queued mails, you can choose which files you want to recover.
Additional Information
If you want to use a new IMSVA server to replace the old one or the old server encountered an issue and doesn't work anymore, perform the following steps to recover the configuration/database on the new IMSVA server:
- Make sure you have the latest backed up configuration, database, and related files.
- Install a new IMSVA server with the same IP as the old one. If you cannot use the same IP, you can also use a different IP.
- If you want to recover only the configuration file, just follow the steps presented above.
If you want to recover everything that could be restored, just restore the database and files as stated above.
- If the server uses a new IP after restoring the database, use the following SQL command to update the IP address:
# /opt/trend/imss/PostgreSQL/bin/psql imss sa
imss=# UPDATE tb_global_setting SET value = 'https://NewIP:8445/' where name = 'ConfigUrl'; - Start the IMSVA services using the following command then check the status:
# /opt/trend/imss/script/imssstart.sh