1s accounting rib. Instructions for setting up a Distributed Information Base (DIB) via FTP resource

A situation often arises when an organization has several branches or retail outlets geographically remote from each other. However, there remains a need to maintain consistent records throughout the organization. One of the options for solving this problem is to create a unified network, which will include automated workstations of all branches, and host the 1C information base on a public server. This method can be technically complex and expensive. In addition, a number of issues related to information security arise.

The second option is to create a distributed information base (RIB). A distributed information base is a hierarchical structure consisting of separate information bases on the 1C:Enterprise platform, between which data exchange is organized for the purpose of synchronizing configuration and data. These individual information bases are called RIB nodes.

A distributed information base can be created based on various configurations of the 1C:Enterprise system. Let's consider its creation using the example of 1C: Trade Management 10.3.

Let’s say an additional retail outlet is opened in a trading organization, where it is necessary to have access to the organization’s general trading system. To create a RIB you must complete the following steps:


This completes the creation of a distributed information base. To exchange information, you need to start data exchange in the Central database (changes that have occurred in it will be downloaded), then in the store (changes from the central database will be downloaded and changes that have occurred in the store will be downloaded), and again in the central database (changes will be downloaded into it , occurred in the store).

Distributed information bases have their own collision resolution mechanism. So, if during an exchange it turns out that any object (document, directory, etc.) has been changed in both the main and subordinate databases, then the change made in the main database will have priority.

If it is necessary to change the configuration of a distributed infobase, this must be done in the root node (see the first figure of the article), the configurations of the remaining nodes are locked. After making the necessary changes, they can be transferred to slave nodes using the standard procedure for exchanging data between RIB nodes. After the exchange is carried out in the configurator of the slave node, it is necessary to update the infobase configuration.

If you have problems setting up a distributed information base, our specialists will help you set up data exchange and explain in detail how to use it.

The technology of distributed information bases (RIB) allows you to create a geographically distributed system based on 1C Enterprise configurations. This allows you to have a common information space even with those departments that do not have a reliable communication channel, combining high autonomy of nodes with the ability to quickly exchange information. In our articles we will look at the features and practical implementation of this mechanism on the 8.2 platform

First of all, let’s ask ourselves: why autoexchange? Modern technologies, combined with inexpensive and fast Internet, make it possible to organize remote work without any difficulties. The choice of methods is as wide as ever: RDP, thin and web clients, connecting networks using VPN - there is a lot to think about. However, all these methods have one significant drawback - a strong dependence on the quality of the communication channel.

Even with ideal operation of the local provider, it is impossible to guarantee 100% availability of the communication channel. Problems with the backbone provider, lack of power supply, physical damage to the communication line and many other factors make this task insurmountable. At the same time, the inaccessibility of the information base at a remote warehouse or retail store leads to quite significant losses. And finally, let’s not forget that there are places (for example, industrial zones on the outskirts of cities) where providing a high-quality communication channel is expensive and/or problematic.

The RIB mechanism allows you to get rid of these shortcomings; each department has its own copy of the information base with which you can work autonomously even in the complete absence of communication with the outside world. And the small amount of transmitted information allows you to use any communication channel, including the mobile Internet, for exchange.

RIB on platform 8.2 is not something fundamentally new, representing a further development of RIB platform 7.7, only now this technology has become more accessible and simpler. Unlike the RIB component, which had to be purchased separately, the RIB is an integral part of many standard configurations and works entirely in user mode, allowing you to do without the Configurator even at the setup stage.

At this point it would be time to move on to the practical part, but we will have to make one more digression. The fact is that the transition to the 8.2 platform, which seems to have already happened, in fact led to the emergence of two types of configurations: based on a managed application, “native” for the 8.2 platform, and adapted from 8.1, continuing to use outdated technologies and mechanisms. Since a significant part of the configurations (Enterprise Accounting, Payroll and HR Management) are adapted or transitional, they cannot be discounted, so the first part of our article will be devoted to these configurations (essentially the 8.1 platform), while in the second we will examine setting up auto-exchange for configurations based on a managed application (platform 8.2).

Let's consider a practical task: setting up automatic exchange via FTP for the Enterprise Accounting 2.0 configuration. Despite the fact that RIB allows you to exchange using email or file shares, we recommend using FTP as the simplest and most reliable method of communication. You can read how to set up your own FTP server, or you can use the FTP service of any hosting provider.

First of all, we need to configure exchange nodes. To do this, launch the configuration with administrator rights and select Transactions - Exchange Plans.

In the list that appears, select Full plan or By organization, if records are kept for several companies in one database and the exchange needs to be made only for one of them. In the window that opens, there is already one node - the central one, we need to edit it by indicating the code and name.

Then we will create another node for the branch, filling it in the same way (to add, click the green circle with a plus). The next step is to create an initial image for this node, which is a ready-made information base in file mode. To do this, right-click on the desired node and select from the drop-down list Create a starting image.

Now let's move on Service - Distributed Information Base (DIB) - Configure RIB nodes.

In the window that opens, click the button Add and configure a new exchange by specifying the remote host, exchange type (via FTP) and server connection parameters.

Bookmark Automatic exchange allows you to set up an exchange schedule, exchange by events (start and end of work, etc.), these settings are made for the user on whose behalf the exchange will be performed, so make sure he has rights to exchange data.

Don't forget to specify the node prefix for document numbering (otherwise you will receive different documents with the same numbers) in Tools - Program Settings; here you can also configure some other exchange parameters. On the same tab, you should select a user to perform exchange tasks; if you do not do this, the schedule will not work. Remember that the exchange will only be made if the user is logged into the program.

This completes the configuration of the central node; now you need to make similar settings for the peripheral node, connecting the initial image as an existing information security system. After which you can start exchanging data. To control you should use Communication monitor, it allows you not only to monitor the success of the upload/download, but also shows any collisions that have arisen or delayed movements (if the user who made the exchange does not have enough rights to perform any actions in the database). The presence of this tool allows you to quickly and effectively solve various types of problems that arise during autoexchange.

At this point, the exchange setup can be considered complete and you can begin working in distributed mode. It is worthwhile to dwell specifically on updating or making changes to the configuration. These actions are only available on the central node; all changes made will be automatically propagated to the peripheral nodes during the next exchange. To make changes automatically, the peripheral database must be in exclusive mode, otherwise you will need to run Configurator and execute Updating the Database Configuration manually.

Creating and configuring a distributed database (RDB) in 1C 8.3 Accounting (and other configurations) is necessary in cases where it is not possible for several users to work while simultaneously connecting to one database. Nowadays this is quite a rare occurrence, since the standard remote desktop works fine and there are other programs that provide a remote connection to the central computer where the database is located.

But nevertheless, there are situations when there is simply no Internet. And the data should ultimately end up in one information base. This is why a distributed database is created.

Usually the main base is called central, and the rest are called peripheral. The bottom line is that either manually or automatically (depending on the settings) the databases are combined into one. To ensure that numbers of newly entered documents and reference codes are not duplicated, a prefix is ​​assigned to each database.

In this instruction, we will use an example to create a central and peripheral database and check the exchange between them. This manual is suitable for both 1C 8.3 Accounting and 1C Trade Management (UT) and other configurations.

Setting up the main (central) distributed RIB database

Let’s go to the 1C “Administration” menu, then click on the “Data synchronization settings” link. In the window that opens, you need to check the “Data synchronization” checkbox. The “Data Synchronization” link will become active. Right here we will set a prefix for the main information base - for example, “CB”:

Click on the “Data synchronization” link and a window will open with a “Set up data synchronization” button. When you click on this button, a drop-down list will open where you need to select the “Full” mode. If synchronization is required for only one organization, you need to select “By organization...”.

In the next window, the program will prompt us to make a backup copy. I strongly recommend doing this, as the following setup steps may be irreversible.

After creating a backup, click the “Next” button. At the next step, we need to decide how synchronization will occur:

  • through a local directory or a directory on the local network;
  • over the Internet via FTP.

For simplicity and clarity of the example, we will select a local directory. I specified the following path: “D:\1C Databases\Synchronization”. It would be a good idea to check entries in this directory; there is a special button for this:

Get 267 video lessons on 1C for free:

We skip the next steps with setting up synchronization via FTP and email. Let's look at the settings for the names of the main and peripheral databases. Here we will set the prefix for the peripheral database:

Don't forget that the prefixes for each database must be unique. Otherwise, you will receive the error “The prefix value of the first infobase is not unique.”

Click “Next”, check the entered information and click “Next” again, then “Finish”. In the “Full name of the file base” field, indicate the file 1Cv8.1CD in the directory that was created for synchronization. We create the initial image of the distributed 1C database:

After creating the initial image of the RIB in 1C, you can set a synchronization schedule or synchronize manually:

After synchronization, you can connect to the new database and make sure that information from the central database has been uploaded there:

Just immediately create at least one user with Administrator rights in the new peripheral database.

Setting up synchronization in the peripheral database

In the 1C peripheral database, configuration is much simpler. Just check the “Data synchronization” checkbox and follow the link of the same name. And we almost immediately find ourselves in a window with the “Synchronize” button. Let's try to create a test item in the peripheral database and upload it to the main one using RIB:

To create a distributed information base, you need to enter the program in 1C: Enterprise mode. To create distributed database nodes, select from the menu: Operations - Exchange plans. The “Select object: Exchange plan” window will open.


1. Consider the option with the “Full” exchange plan.

The exchange will be carried out across all organizations located in the distributed information base.

Let’s choose the “Full” exchange plan. The “Full Exchange Plan” window will open.

We fill out two entries:

Let's call the first entry “Main node”, indicate the code “GU”,

Let's call the second entry “Subordinate node” and indicate the code “PU”.

As we can see from the figure, the first entry has an icon with a green circle; this is the “Main Node” icon.


To create a copy of the “Main node” information base, click on “Slave node” and click on the “Create initial image” icon. This will be the “Subordinate Node” information base.


The “Creating an initial information security image” window will open, select “On this computer or on a computer on the local network”, click “Next”.


In the “Infobase Directory” field, select the location where the copy of the “Main Node” will be installed, and click “Finish”.


After creating the “Subordinate Node” infobase, the following message will appear:


Click “Ok”.

Add the “Subordinate Node” information base to “1C: Enterprise”. We go to the subordinate database in the "1C: Enterprise" mode. Let's open: Operations - Exchange Plans. The “Select object: Exchange plan” window will open. Let’s choose the “Full” exchange plan. The “Full Exchange Plan” window will open. We see that the “Main Node” icon is orange, which means that this node is the main node for the information base in which we are located.


We make the following settings in both the Master and Slave nodes:

1. Add a prefix for the distributed infobase.

This is done so that there are no conflicts in the numbers and codes of documents and directories created in two databases, so in each database we indicate a prefix that will be added to the document numbers and directory codes. Open: Tools - Program settings - “Data exchange” tab. In the “Node prefix for a distributed infobase:” field, enter “PU” in the subordinate database, and “GU” in the main database.


2. Add a setting for data exchange between nodes:

Open: Service - Distributed Information Base (DIB) - Configure RIB nodes. The “Data Exchange Settings” window will open.


Click “Add” and the “Data exchange settings” window will open. Enter the “Name” of your setting.


A node will automatically appear in the “Node” field, for the “Master node” there will be a “Slave node”, for the “Slave node” there will be a “Master node”.

In the “Directory” field, select the folder into which the exchange data will be sent; it is best to specify one directory for the main and slave databases.

In the “Exchange Type” field, we configure the transfer of data between databases: through a file or FTP resource. Let’s choose, for example, “sharing via a file resource.”

We do not change anything in the remaining fields.

Click “Ok”. We see that a setting has appeared.

3. To exchange data we do the following:

First, in the database in which the changes were made, click on the “Exchange according to the current setting” icon, as shown in the figure.


After uploading, the upload result window will appear.


Then, in the database to which you want to transfer the changes, click on the “Exchange according to the current setting” icon and the data will go to the database you want.

2. Consider the option with the “By organization” exchange plan.

The exchange will be carried out among selected organizations located in a distributed information base.

To create nodes of a distributed database, select from the menu: Operations - Exchange plans. The “Select object: Exchange plan” window will open.


Let’s choose the exchange plan “By organization”. The “Exchange Plan By Organization” window will open.

We fill out two entries:

Let’s call the first entry “Main Node”, indicate the code “GU”, we see the difference from the “Exchange Plan: Full”, a table has appeared in which we indicate the Organizations for which the exchange will take place.

Let's call the second entry “Subordinate node”, indicate the code “PU”, indicate the organization.


In all other respects, the setup is absolutely the same as with the “Exchange Plan: Full”.

This material contains detailed instructions for setting up the RIB exchange for 1C:Enterprise 8 and the problems that the author encountered.

1. Creating nodes
We create new nodes (master and slave): in the user mode "Operations / Exchange Plans / Full"
Let's choose the exchange plan "Full"
We create two records:
- let’s call the first record “CB” (main node), indicate the code “CB”,
- let's call the second entry “Subordinate node”, indicate the code “PU”.
Icon with a green circle - "CB" (main node)

For the slave node, click on the “Create initial image” icon. (Requires exclusive access)
Create a starting image
Next, in the window that opens, fill in the parameters of the new database. When finished, click the “Finish” button.
Creating an initial information security image
The creation of the initial image of the slave node of the distributed infobase will begin, and upon completion the message “Creation of the initial image has been successfully completed” will appear. Click the "OK" button.
We add the base of the slave node to the list of bases and launch it.
In this subordinate database we open the full exchange plan - the “CB” icon is red, this means that this node is the main node for the information base in which we are located.

2. Setting up prefixes
For each database, in the accounting parameters settings (in the UPP "Service / Accounting Parameters") on the "Data Exchange" tab, we set prefixes. This is done so that there are no conflicts in the numbers and codes of documents and directories created in two databases.
For automatic exchange, check the box "Use automatic exchange mechanism..."
Tab "Data exchange"

3. Add a setting for data exchange between nodes
Open: "Service\Distributed Information Base (RIB)\Configure RIB nodes"
Click "Add" and the "Data exchange settings" window will open.
Setting up data exchange

Click on the "Exchange according to current settings" icon
Execute the exchange according to the current setting

Now about the pitfalls
1. Data exchange can be carried out automatically and can be initiated in the following cases:
* When starting the program. The exchange will be performed when the program starts,
* When you finish working with the program. The exchange will be performed before the user exits the program,
* When the catalog appears. The exchange will be performed only if the directory specified by the user was invisible, but has now become visible. The setting can be used to perform automatic exchange when connected to a local network or flash card. The program will periodically check the visibility of the directory specified in the settings and note its current state,
* When the file appears. It is recommended to use data mode when you need to exchange if an incoming data exchange file appears. In this case, it is enough to specify the full path to the incoming data exchange file. The program periodically analyzes the presence of the file, and as soon as it appears, the exchange will be performed, and after the exchange, this file will be forcibly DELETED (this is done so that the exchange procedure is not carried out constantly),
* Periodic data exchange. The exchange will be carried out according to the settings for periodic data exchange. If the infobase operates in file server mode, then periodic exchange is performed only for the user who is specified in the accounting policy settings as “User for routine tasks in file mode.” In the Client-server version, the exchange is performed on the 1C:Enterprise server.

I have a Client-Server option - for routine auto-exchange to work, I had to overload the server

2. Windows encoding.
The exchange was interrupted by an error because the file was not compressed. This is due to a Cyrillic error in the command line during compression.
It can be treated by correcting the encodings in the registry.
For example, for Windows Server 2008 -
Code

REGEDIT4
"1250"="c_1251.nls"
"1251"="c_1251.nls"
"1252"="c_1251.nls"
"1253"="c_1251.nls"
"1254"="c_1251.nls"
"1255"="c_1251.nls"

3. When creating a copy of the database (for example, for modification) in the client-server version, it is NECESSARY that the ROUTINE TASKS OF THE COPY OF THE DATABASE be OFF. Blocking routine tasks for copy ON

If they are not blocked, then the copy will make exchanges on the same schedule as the main database. This means that some messages to remote nodes will be generated from the working database, and some from a copy, which will lead to desynchronization of configurations.