During the update of Traffic Monitor server configuration files (e.g, with .conf, .cfg, and .lua extensions) that were modified when using the previous version, cannot be overwritten with the new files. The new files are created in the same directories and with the same names, but with .rpmnew extension respectively. This is done to support the ability to change the structure of new file versions. For correct operation of the System it is required merging files of an old and a new version. | Предупреждение |
|---|
| During the update, do not change the web.conf, database.conf, consul.json files. |
You can use any method of file merging type described below. Automatic merge of Traffic Monitor configuration files| Предупреждение |
|---|
| Automatic merging applies only to Traffic Monitor configuration files with the .conf extension that are located in the /opt/iw/tm5/etc directory. Before merging, backup copies for source configuration files are created in the /opt/iw/tm5/etc_conf_backup_<date_time> directory. An example of the directory name: /opt/iw/tm5/etc_conf_backup_11.12.2020_09:26:33. After merging, files with the.rpmnew extension, which relate to merged configuration files, will be deleted. All steps will be logged in the /var/log/infowatch/iwtm-install-<version>-<date>_<time>.log file. An example of the log file name: /var/log/iwtm-install-7.1.0.231-2020-11-19_09-56-25.log. You can also find information on the merge process in the /var/log/infowatch/config_merge/ directory. If during operations with a configuration file, some errors occur, the process is not stopped and other files are merged. Records concerning the errors will be added to the log file. |
To start the process, you will need the iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm package, which is a part of the Traffic Monitor distribution kit. In our example: iwtm-config-merge-tools-7.1.0.250-release.x86_64.rpm | Информация |
|---|
| If the iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm package is missing, you can find it in packages of the installer: iwtm-installer-x.x.x.xxx-rhel7.run. For this: - Go to the directory with the Traffic Monitor distribution kits. In our example:
cd /root - Extract the contents of the installer with the command:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run --target <директория>
In our example, the command is as follows: bash ./iwtm-installer-7.1.0.250-rhel7.run --target /root
- To find the required package, use the command:
find / -name "iwtm-config-merge-tools*" -print
|
To start automatic merging of Traffic Monitor configuration files: - Find out which version of Traffic Monitor is installed. For this, enter the command:
cat /opt/iw/tm5/version - Go to the directory, to which the
iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm package was copied. In our example, the command is as follows:
cd /root - To install the package, run the command:
rpm -i iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm
In our example, the command is as follows: rpm -i iwtm-config-merge-tools-7.1.0.250-release.x86_64.rpm
To run the script, use the command: /opt/iw/tm5/bin/config/config_merge/scripts/run_merge.sh -cv <current_version> -nv <new_version> -b <directory_for_backup>
In our example, the command is as follows: /opt/iw/tm5/bin/config/config_merge/scripts/run_merge.sh -cv 6.10.10.123 -nv 7.1.0 -b
| Информация |
|---|
| If you do not specify a directory for the backup, the /opt/iw/tm5/ directory is used by default. |
Wait until file processing is complete.| Информация |
|---|
| If you receive error messages, fix the errors and the script again or merge configuration files manually. |
Merging configuration files in Midnight CommanderLet's consider an example to merge postgresql.conf and postgresql.conf.rpmnew files. | Подсказка |
|---|
| To view the file content, press F3. For editing, press F4. |
The postgresql.conf file looks like: 
The postgresql.conf.rpmnew file looks like: 
To merge these files, you need to copy data from sections of the postgresql.conf file to the corresponding sections of the postgresql.conf.rpmnew file. For this: | Multiexcerpt |
|---|
| - Go to
/opt/iw/tm5/etc directory. - Position the cursor on postgresql.conf.rpmnew file in the file manager.
 - Press F4.
Replace the values in the file sections with the values from correspondings sections of the postgresql.conf file. The result looks like this:
 | Информация |
|---|
| For the distributed installation type, the value of the "Host" field will be an IP address of the server where the DBMS is installed. For example,  |
- Press F2.
- In the window that opens, confirm the file saving by clicking Save.
- Press F10.
Position the cursor on the postgresql.conf file in the file manager. - Press F8 to delete the postgresql.conf file.
- In the window that opens, confirm the deletion by clicking Yes.
- Select the postgresql.conf.rpmnew file in the file manager.
- Press F6.
- In the to field, enter
/opt/iw/tm5/etc/postgresql.conf and press Enter. Now the System has only one PostgreSQL configuration file, which is postgresql.conf. It has a structure of the new version and the required content:

|
Merging configuration files by means of vimdiffTo work with vimdiff the editor Vim should be installed on a server. Let's consider an example of merging user.lua and user.lua.rpmnew files. After the update, the user.lua. rpmnew file appears (if the original user.lua file has been changed). You should copy all earlier specified values of parameters and settings from user.lua to user.lua.rpmnew. To do this: - Go to
/opt/iw/tm5/etc/scripts directory. - In the command line, enter:
vimdiff user.lua.rpmnew user.lua
- Go into edit mode (Insert key).
- If parameter values are different, copy the values from user.lua to user.lua.rpmnew manually.
- Exitthe edit mode (Esc key).
- Save the changes within user.lua.rpmnew and exit the editor (input :wq)
- Close the file user.lua as moot (input :q).
- Rename user.lua.rpmnew to user.lua.
| Предупреждение |
|---|
| To avoid data loss and System errors (Traffic Monitor server part configuration files) it is required to follow the instructions. In case of any trouble while merging the configuration files you are recommended contacting InfoWatch service desk via support@infowatch.com. The service desk is available from 7 AM till 9 PM Moscow time, from Monday to Friday, except weekends and public holidays. You can also find the required info on http://www.infowatch.com/support. |
| Предупреждение |
|---|
| To avoid System's improper operation you should avoid merging the following files with the files from older versions: - /etc/rc.d/init.d/postgresql-9.6.rpmnew
- /etc/sgml/docbook/xmlcatalog.rpmnew
|
|