Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

📚 GuideСервер 1С на Windows и LinuxПосле установки · часть 13 из 14
Guide contents
После установки
  1. Сервер 1С, часть 3: резервное копирование, обслуживание и технологический журнал
  2. Сервер 1С, часть 4: безопасность и типовые ошибки — что делать, если не подключается
Редакция КоммитРедакция портала
commit 4bcebaa · 19 days ago

1C Server, Part 3: Backup, Maintenance, and Technology Log

🌐 Machine-translated from Russian. Show original

In this part:

3-2-1 rule#

  • 3 copies of data: working database and two backups;
  • on 2 different media;
  • 1 off-server copy — in another building or cloud.

A copy on the same disk as the database is not a backup. Ransomware and disk failure are carried away by both.

Backup using DBMS tools#

The main method for working bases: fast, does not require kicking out users.

PostgreSQL (Linux, cron every night):

#!/usr/bin/env bash
set -euo pipefail
D=/backup/1c; mkdir -p $D
for db in buh retail; do
  pg_dump -h 127.0.0.1 -U usr1c -Fc -d "$db" -f "$D/${db}_$(date +%F).dump"
done
find $D -name '*.dump' -mtime +14 -delete

Store the password for pg_dump in a file ~/.pgpass with 600 rights, not in a script. Recovery — pg_restore to an empty database.

MS SQL Server — full scheduled backup via a service plan or SQL Agent job; with the Full recovery model — also backups of the transaction log every 15–60 minutes.

Unloading .dt#

The .dt file is a copy of the database using 1C tools, independent of the DBMS. Convenient for transferring between servers and the DBMS.

  • Configurator → Administration → Export Information Database — exclusive mode required (users must sign out).
  • The ibcmd utility can export the database directly from the DBMS, without a cluster — see the parameters in ibcmd help infobase dump.

Make .dt at least before updating the configuration and platform, and for daily copies, use the DBMS backup.

Recovery check#

A backup that has never been restored is hope, not a backup. Once a month:

  1. Restore the copy to the test database under a different name.
  2. Enable blocking scheduled tasks for it.
  3. Open the database and check the latest documents.

Regular maintenance#

  • PostgreSQL: autovacuum enabled; after bulk operations (month closing, loading) — VACUUM ANALYZE outside working hours.
  • MS SQL: rebuild or reorganize indexes and update statistics once a week, update statistics every night.
  • 1C cluster: restart workflows on schedule or when memory is exceeded (working server settings).
  • Free space: monitor discs with databases, logs, and backups.

Technological Journal#

The Technological Journal (TJ) is the main tool for analyzing errors and brakes. Configurable with the file logcfg.xml:

  • Windows — C:\Program Files\1cv8\conf\logcfg.xml
  • Linux — /opt/1cv8/conf/logcfg.xml

Minimal example — exceptions and errors, keep for 24 hours:

<config xmlns="http://v8.1c.ru/v8/tech-log">
  <log location="/var/log/1c/techlog" history="24">
    <event><eq property="name" value="EXCP"/></event>
    <event><eq property="name" value="EXCPCNTX"/></event>
    <property name="all"/>
  </log>
</config>
  • The log directory must exist and be accessible to the 1C service user.
  • Do not leave the detailed TJ on for long: it quickly clogs the disk and slows down the server. To analyze blocks and long requests, enable the necessary events during the investigation.

Clearing the cluster cache#

If after a failure the cluster behaves strangely (frozen sessions, errors connecting to already remote databases), clearing the service cache helps:

  1. Stop the 1C server service.
  2. In the srvinfo directory, in the reg_1541folder, delete the snccntx* folders (do not touch the cluster registry file itself).
  3. Start the service.

Before that, make a copy of the srvinfo directory.

Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.