Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMIG and version 7.1
Sv translation
languageru

Во время обновления сервера Traffic Monitor конфигурационные файлы (например, с расширениями .conf, .cfg и .lua), которые были изменены во время использования предыдущей версии, не перезаписываются новыми. В тех же директориях создаются новые файлы с теми же названиями, но с расширением .rpmnew. Это сделано для того, чтобы поддержать возможность изменения структуры файлов новых версий. Для корректной работы Системы потребуется объединить файлы старой и новой версий.

Предупреждение
titleВажно!

В процессе обновления не вносите изменения в файлы web.conf, database.conf, consul.json.

Используйте любой из приведенных ниже способов объединения файлов.

Автоматическое объединение (merge) конфигурационных файлов Traffic Monitor

Предупреждение
titleВажно!

Автоматическое объединение затрагивает только конфигурационные файлы Traffic Monitor с расширением .conf, расположенные в директории /opt/iw/tm5/etc.
Перед объединением в директории /opt/iw/tm5/etc_conf_backup_<дата_время> будут созданы резервные копии исходных конфигурационных файлов. Пример названия директории: /opt/iw/tm5/etc_conf_backup_11.12.2020_09:26:33.
После успешного объединения файлы с расширением.rpmnew, которые относятся к затрагиваемым конфигурационным файлам, будут удалены.
Все выполненные действия будут отражены в лог-файле /var/log/infowatch/iwtm-install-<версия>-<дата>_<время>.log. Пример названия лог-файла: /var/log/iwtm-install-7.1.0.231-2020-11-19_09-56-25.log.
Также информацию о процессе можно найти в директории /var/log/infowatch/config_merge/.
Если во время действий с конфигурационным файлом будут обнаружены ошибки, процесс не будет остановлен, а перейдет к следующему файлу. Записи об ошибках в этом случае будут также добавлены в лог-файл.

Для запуска процесса понадобится пакет iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm, поставляемый в составе дистрибутива Traffic Monitor.

В нашем примере: iwtm-config-merge-tools-7.1.0.250-release.x86_64.rpm

Информация
titleПримечание:

Для поиска необходимого пакета используйте команду:

find /opt/iw/distr/ -name "iwtm-config-merge-tools*" -print

Если пакет iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm отсутствует, его можно найти в составе инсталлятора iwtm-installer-x.x.x.xxx-rhel7.run.

Для этого:

  1. Перейдите в директорию c дистрибутивами Traffic Monitor. В нашем примере:
    cd /root
  2. Извлеките содержимое инсталлятора, выполнив команду:

    bash ./iwtm-installer-x.x.x.xxx-rhel7.run --target <директория>

    В нашем примере команда будет следующей:

    bash ./iwtm-installer-7.1.0.250-rhel7.run --target /root

    Для поиска необходимого пакета используйте команду:
    find / -name "iwtm-config-merge-tools*" -print

    tmp/iw_distr

Чтобы запустить автоматическое объединение конфигурационных файлов Traffic Monitor:

  1. Определите установленную версию Traffic Monitor. Для этого введите команду:
    cat /opt/iw/tm5/version
  2. Перейдите в директорию, в которую скопирован пакет iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm.
    В нашем примере команда:

    cd /tmp/rootiw_distr
  3. Для установки пакета выполните команду:

    rpm -i iwtm-config-merge-tools-x.x.x.xxx-release.x86_64.rpm

    В нашем примере команда будет следующей:

    rpm -i iwtm-config-merge-tools-7.1.0.250-release.x86_64.rpm

  4. Для запуска скрипта введите команду:

    /opt/iw/tm5/bin/config/config_merge/scripts/run_merge.sh -cv <текущая_версия> -nv <новая_версия> -b <директория_для_резервной_копии>

    В нашем примере команда будет следующей:

    /opt/iw/tm5/bin/config/config_merge/scripts/run_merge.sh -cv 6.10.10.123 -nv 7.1.0.250 -b

     

    Информация
    titleПримечание:

    Если не указать директорию для резервной копии, будет использовано значение по умолчанию: /opt/iw/tm5/

Дождитесь завершения обработки файлов.

Информация
titleПримечание:
Если в процессе будут выведены сообщения об ошибках, исправьте их и повторно запустите скрипт или выполните объединение конфигурационных файлов вручную.


Объединение конфигурационных файлов в Midnight Commander

Рассмотрим объединение на примере файлов postgresql.conf и postgresql.conf.rpmnew.

Информация
titleПодсказка:

Чтобы просмотреть файл, нажмите F3, чтобы отредактировать - F4.

Файл postgresql.conf имеет вид:

Файл postgresql.conf.rpmnew имеет вид:

Для объединения требуется перенести данные из секций файла postgresql.conf в соответствующие секции файла postgresql.conf.rpmnew. Для этого:

Multiexcerpt
MultiExcerptNameRU
  1. Перейдите в директорию /opt/iw/tm5/etc
  2. Установите курсор на файл postgresql.conf.rpmnew в файловом менеджере.
  3. Нажмите F4.
  4. Замените значения секций файла значениями соответствующих секций файла postgresql.conf. Получится так: 

    Информация
    titleПримечание:

    При распределенном типе установки значением поля "Host" будет IP-адрес сервера, на котором установлена СУБД. Например:

  5. Нажмите F2.
  6. В открывшемся окне подтвердите сохранение файла, нажав Save.
  7. Нажмите F10.
  8. Установите курсор на файл postgresql.conf в файловом менеджере.

  9. Нажмите F8 для удаления файла postgresql.conf.
  10. В открывшемся окне подтвердите удаление файла, нажав Yes.
  11. Выделите файл postgresql.conf.rpmnew в файловом менеджере.
  12. Нажмите F6.
  13. В поле to введите /opt/iw/tm5/etc/postgresql.conf и нажмите Enter.
    Теперь в Системе есть только один конфигурационный файл PostgreSQL - postgresql.conf. Он имеет структуру файла новой версии и нужное наполнение:

Объединение конфигурационных файлов с помощью vimdiff

Для работы с vimdiff на сервере должен установлен текстовый редактор vim. 

Рассмотрим объединение на примере файлов user.lua и user.lua.rpmnew. После обновления (при условии, если в штатный файл user.lua вносились изменения) появится файл user.lua.rpmnew. Необходимо корректно перенести все установленные ранее значения параметров и настроек из user.lua в user.lua.rpmnew. Для этого:

  1. Перейдите в директорию /opt/iw/tm5/etc/config/lua/scripts/
  2. Введите в командной строке:
    vimdiff user.lua.rpmnew user.lua
  3. Перейдите в режим редактирования (клавиша Insert).
  4. Вручную перенесите различающиеся значения параметров из user.lua в user.lua.rpmnew.
  5. Выйдите из режима редактирования (клавиша Esc).
  6. Сохраните изменения в файле user.lua.rpmnew и выйдите из редактора (введите :wq).
  7. Закройте уже не актуальный файл user.lua (введите :q). 
  8. Удалите файл user.lua.
  9. Переименуйте файл user.lua.rpmnew в user.lua.
Предупреждение
titleВажно!
Чтобы избежать потери данных и ошибок в работе Системы (конфигурационные файлы серверной части Traffic Monitor), необходимо внимательно следовать инструкциям.
В случае возникновения трудностей при объединении конфигурационных файлов рекомендуется обратиться в службу технической поддержки компании InfoWatch по адресу support@infowatch.com.

Службы технической поддержки – с 7:00 до 21:00 по московскому времени с понедельника по
пятницу, исключая официальные выходные и праздничные дни РФ.
Вы также можете посетить раздел технической поддержки на нашем сайте:
http://www.infowatch.ru/services/support.

Предупреждение
titleВажно!

Во избежание некорректной работы Системы не стоит объединять следующие файлы с файлами из старых версий:

  1. /etc/rc.d/init.d/postgresql-9.6.rpmnew
  2. /etc/sgml/docbook/xmlcatalog.rpmnew

 


-release.x86_64.rpm

Sv translation
languageen

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.

Предупреждение
titleImportant!

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

Предупреждение
titleImportant!

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

Информация
titleNote:
Информация
titleNote:

To find the required package, use the command:

find /opt/iw/distr/ -name "iwtm-config-merge-tools*" -print

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:

  1. Go to the directory with the Traffic Monitor distribution kits. In our example:
    cd /root
  2. Extract the contents of the installer with the command:

    bash ./iwtm-installer-x.x.x.xxx-rhel7.run --target <директория><directory>

    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

    tmp/iw_distr

To start automatic merging of Traffic Monitor configuration files:

  1. Find out which version of Traffic Monitor is installed. For this, enter the command:
    cat /opt/iw/tm5/version
  2. 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 /tmp/rootiw_distr
  3. 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

  4. 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.250 -b

    Информация
    titleNote:

    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.

Информация
titleNote:

If you receive error messages, fix the errors and the script again or merge configuration files manually.


Merging configuration files in Midnight Commander

Let's consider an example to merge postgresql.conf and postgresql.conf.rpmnew files.

Подсказка
titleTip

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
MultiExcerptNameENG
  1. Go to /opt/iw/tm5/etc directory.
  2. Position the cursor on postgresql.conf.rpmnew file in the file manager.
  3. Press F4.
  4. Replace the values in the file sections with the values from correspondings sections of the postgresql.conf file. The result looks like this:

    Информация
    titleNote:

    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, 

  5. Press F2.
  6. In the window that opens, confirm the file saving by clicking Save.
  7. Press F10.
  8. Position the cursor on the postgresql.conf file in the file manager.

  9. Press F8 to delete the postgresql.conf file.
  10. In the window that opens, confirm the deletion by clicking Yes.
  11. Select the postgresql.conf.rpmnew file in the file manager.
  12. Press F6.
  13. 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 vimdiff

To 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:

  1. Go to /opt/iw/tm5/etc/scripts directory.
  2. In the command line, enter:
    vimdiff user.lua.rpmnew user.lua
  3. Go into edit mode (Insert key).
  4. If parameter values are different, copy the values from user.lua to user.lua.rpmnew manually.
  5. Exitthe edit mode (Esc key).
  6. Save the changes within user.lua.rpmnew and exit the editor (input :wq)
  7. Close the file user.lua as moot (input :q).
  8. Rename user.lua.rpmnew to user.lua.
Предупреждение
titleImportant!

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.

Предупреждение
titleImportant!

To avoid System's improper operation you should avoid merging the following files with the files from older versions:

  1. /etc/rc.d/init.d/postgresql-9.6.rpmnew
  2. /etc/sgml/docbook/xmlcatalog.rpmnew