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

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

Ключ

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

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

Категорически не рекомендуем выключать сервер базы данных (БД) кнопкой питания. В некоторых случаях это может привести к повреждению БД.

При выполнении регламентных работ на сервере БД придерживайтесь такого порядка:

  1. Закройте все окна браузера, отображающие Консоль управления. Убедитесь, что отсутствуют соединения со схемой БД Traffic Monitor из других программ. Если такие соединения есть, отключите их. 
  2. На сервере Traffic Monitor остановите процессы Traffic Monitor:
    iwtm stop
    systemctl stop iwtm-php-fpm
    systemctl stop nginx
  3. На сервере БД получите список заданий, запускающихся по расписанию. Для этого в psql от имени владельца схемы выполните запрос:
    select jobname, case when jobagentid is null then 'scheduled' else 'running' end state
    from pgagent.pga_job
    where jobenabled= true;
  4. Выключите задания, выполнив сценарий:
    select iwtm.pkg_utility_disable_job('JOB_1');
    ...
    select iwtm.pkg.utility_disable_job('JOB_N');
    commit;
    где JOB_1… JOB_N – имена выключаемых заданий.
  5. Убедитесь, что ни одно задание не выполняется. Для этого выполните запрос:
    select pga_job.jobname
    from pgagent.pga_job
    where pga_job.jobagentid is not null;
    Текущее задание невозможно остановить из PostgreSQL – это следует сделать посредством остановки агента из Linux с помощью команды:
    systemctl stop pgagent-15 (остановка всех задач при помощи единой команды).
  6. Выполните работы с БД.
  7. По окончании работ с сервера Traffic Monitor проверьте соединение с сервером БД:
    psql postgres iwtm
    Если проверка пройдена успешно, тогда в ответ на выполнение команды будет выведено приглашение psql:
    postgre=# или postgres=>
  8. Запустите процессы сервера Traffic Monitor:
    iwtm start
    systemctl start iwtm-php-fpm
    systemctl start nginx
  9. Проверьте системный журнал на наличие ошибок. Путь к файлу журнала:
    /var/log/messages
  10. Если в системном журнале содержится информация об ошибках, то обратитесь в службу технической поддержки.
  11. Включите выполнение ранее отключенных заданий:
    BEGIN
    select iwtm.pkg_utility_enable_job('JOB_1');
    ...
    select iwtm.pkg_utility_enable_job('JOB_N');
    commit;
    end;
    /
    где JOB_1… JOB_N – имена ранее остановленных заданий.

Sv translation
languageen
Предупреждение
titleWarning!

We highly recommend not shutting down the DB server with the power button: in certain cases, this may cause the DB corruption.

If you need to carry out routine maintenance on the database server, take the following steps:

  1. Close all instances of the Management Console. Make sure that all connections of other programs to Traffic Monitor database scheme are closed; if there are any active connections, disable them.
  2. Stop all TM processes on Traffic Monitor server:
    iwtm stop
    systemctl stop iwtm-php-fpm
    systemctl stop nginx
  3. On the database server, retrieve the list of scheduled jobs. For this, in psql, run the following query as the database scheme owner:
    select jobname, case when jobagentid is null then 'scheduled' else 'running' end state
    from pgagent.pga_job
    where jobenabled= true;
  4. Disable jobs by running the following script:
    select iwtm.pkg_utility_disable_job('JOB_1');
    ...
    select iwtm.pkg.utility_disable_job('JOB_N');
    commit;
    where JOB_1… JOB_N are the names of jobs to be disabled.
  5. To make sure that there are no running jobs, run the following query:
    select pga_job.jobname
    from pgagent.pga_job
    where pga_job.jobagentid is not null;
    A current task cannot be stopped in PostgreSQL, this should be done by stopping the agent from Linux using thу following command:
    systemctl stop pgagent-15 (stopping all tasks with one command)
  6. Make all the necessary operations with the database.
  7. After all operations are complete, check the connection to the database server from Traffic Monitor server:
    psql postgres iwtm
    where server_name is database name or IP address 
    If the test is successful, the following psql invitation will appear:
    postgre=# or postgres=>
  8. Run the Traffic Monitor server processes:
    iwtm start
    systemctl start iwtm-php-fpm
    systemctl start nginx
  9. Check if the system log contains errors. The path to the system log:
    /var/log/messages
  10. If the system log contains any error messages, consult the technical support service.
  11. Enable running previously disabled jobs:
    BEGIN
    select iwtm.pkg_utility_enable_job('JOB_1');
    …
    select iwtm.pkg_utility_enable_job('JOB_N');
    commit;

    end;
    /
    where JOB_1… JOB_N are the names of the previously stopped jobs.