How to set up smartphones and PCs. Informational portal
  • home
  • Advice
  • Creation of the image of ribs. Distributed Information Base: The Basics

Creation of the image of ribs. Distributed Information Base: The Basics

Instructions for creating and configuring distributed databases using the URBD component (URIB)

The URBD (Distributed Database Management) component is used to exchange information between two identical 1C databases. If the configurations are different, then you can also use it, it is written about this in another. For the component to work, the DistrDB.dll file must be present in the BIN folder of the 1C: Enterprise program.

Let's take a look at the steps to create distributed databases. For example, we have a working base in the D: \ base1 directory. It is required to make it central and create a peripheral base.

1. Create a directory D: \ base2 for the peripheral base.

2. In directories D: \ base1 and D: \ base2 create folders CP and PC (we use Latin letters).

3. Launch the central database configurator (D: \ base1) and select Menu - Administration - Distributed IB - Management.

4. Press the button "Central IB", in the window that appears, enter the code and the name of the database. It is better to use numbers or Latin letters for the code. We enter, for example, 001 and "Central base", confirm by pressing the "OK" button.

5. Press the button "New peripheral IB" in order to create a peripheral base. Enter the parameters for it: 002 and "Peripheral base 1".

6. Select the base "Peripheral base 1" with the cursor and press the button "Settings. auto-exchange ". In the settings, change the manual mode to automatic. Be careful, this is important.

7. Select the "Peripheral base 1" base with the cursor and press the "Upload data" button, then the "OK" button. As a result of unloading, the file D: \ base1 \ CP \ 020.zip will appear.

8. Launch 1C in the configurator mode, add a new base "Peripheral base 1" in the 1C startup window, specify the previously created directory D: \ base2 for it.

9. Select Menu - Administration - Distributed IS - Management. To the question asked “The infobase was not found. Do you want to download data? " press the "Yes" button and specify the file name "D: \ base1 \ CP \ 020.zip", press the "OK" button. After the download is complete, the process of creating a peripheral base can be considered complete.

In and still in the methods of creating a peripheral database by restoring a copy of the central database from a backup or attaching the files of a copy of the central database for SQL format and executing a script are given. This will be useful for large amounts of data, when uploads-downloads stretch for hours or are generally unrealistic.

Instructions for the exchange between distributed databases using the URBD component (URIB)

Let's consider a simplified example, we will perform the exchange manually by launching the configurator. You can use the batch mode of the configurator, to deliver exchange packages you can use mail, ftp, automatic file copying.

To perform the exchange, select Menu - Administration - Distributed information security - Auto exchange. If the exchange is automatic (see point 6 of the previous instruction), then we will succeed.

1. So, we change or create some objects that migrate to the peripheral base. Object migration rules are set on the "Migration" tab in the object properties (see the object tree in the configurator).

2. Launch the configurator of the central base, select Menu - Administration - Distributed information security - Auto exchange, press the "Run" button.

3. The resulting file D: \ base1 \ CP \ 020.zip is moved to the folder D: \ base2 \ CP \

4. We change some objects of the peripheral database. It is desirable not to those that changed before in the central database, tk. the central base takes precedence over changes to objects when exchanged.

5. Launch the peripheral base configurator, select Menu - Administration - Distributed information security - Auto exchange, press the "Run" button.

6. As a result of auto-exchange, we should have changes received from the central database. We should also have a file to transfer to the central database D: \ base2 \ PC \ 021.zip

7. Copy the file D: \ base2 \ PC \ 021.zip to the folder D: \ base1 \ PC

8. Repeat step 2. As a result, the changes from the peripheral database will appear in the central database.

So, the general principle of exchange: alternate execution of auto-exchange with the simultaneous movement of files (exchange packages) from the PC folder of one base to the PC folder of another base and from the CP folder of one base to the CP folder of another base.

Configuration changes are made only in the central database. When changing the configuration, it is necessary to carry out the exchange in the peripheral bases in an exclusive mode. For the successful processing of packets from peripheral bases in the central base, the configuration must be loaded into the peripheral bases. If you get confused, it's okay, the package rejected by the central database will be re-uploaded.

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

1. Creation of nodes
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:
- the first record will be called "Central Bank" (main node), the code will be "Central Bank",
- we will name the second record "Subordinate node", we will indicate the code "PU".
Icon with a green circle - "Central Bank" (main node)

For the subordinate node, click on the "Create initial image" icon. (Exclusive access required)
Create initial image
Next, in the window that opens, fill in the parameters of the new database. When finished, press the "Finish" button
Creating an initial information security image
Creation of the initial image of the slave node of the distributed infobase begins, and upon completion the message "Creation of the initial image was completed successfully" appears. Click the "OK" button.
Add the base of the subordinate node to the list of bases, launch it.
In this subordinate base, we open the full exchange plan - the "Central Bank" icon is red, which means that this node is the main one for the information base in which we are located.

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

3. Add the setting of data exchange between nodes
Open: "Service \ Distributed Information Base (RIB) \ Configure RIB Nodes"
Click "Add", the "Data exchange settings" window will open
Communication setup

Click on the "Execute exchange at the current setting" icon
Execute an exchange on the current setting

Now about the "pitfalls"
1. Data exchange can be performed automatically and can be initialized 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 finishes working with the program,
* When the catalog appears. The exchange will be performed only if the directory specified by the user was not visible, but is currently 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 mark its current state,
* When the file appears. It is recommended to use this mode when you need to perform an exchange if an incoming data exchange file appears. In this case, it is sufficient to specify the full path to the incoming data exchange file. The program periodically analyzes the presence of a 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 performed constantly),
* Periodic data exchange. The exchange will be performed according to the settings of the periodic data exchange. If the infobase operates in file-server mode, then periodic exchange is performed only by the user who is specified in the accounting policy settings as "User for scheduled 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 the scheduled auto-exchange to work, I had to overload the server

2. Windows encoding.
The exchange was interrupted by an error - because the file is not compressed. This is due to a Cyrillic error on the command line when compressing.
It is treated by correcting encodings in the registry.
For example, for Windows Server 2008 -
The 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 revision) in the client-server version, it is NECESSARY that the REGULATORY JOBS OF THE COPY of the database are OFF. Locking scheduled jobs for copy ON

If they are not blocked, then the copy will make exchanges according to the same schedule as the main base. 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.

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

First of all, let's ask ourselves a question: why auto-exchange? Modern technologies, combined with inexpensive and fast Internet, allow organizing remote work without any difficulties. The choice of methods is wider than ever: RDP, thin and web clients, connecting networks using VPN - there is something to think about. However, all these methods have one significant drawback - a strong dependence on the quality of the communication channel.

Even with the ideal work of a 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 insoluble. At the same time, the inaccessibility of the information base at a remote warehouse or in a retail store leads to quite tangible losses. And finally, let's not forget that there are places (for example, industrial zones on the outskirts of cities) where it is expensive and / or problematic to bring a high-quality communication channel.

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

RIB on the 8.2 platform is not something fundamentally new, representing a further development of the URIB platform 7.7, only now this technology has become more accessible and simpler. Unlike the URIB component, which had to be purchased separately, the RIB is an integral part of many typical configurations and operates entirely in user mode, making it possible 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 platform 8.2, which seems to have already occurred, in fact led to the emergence of two types of configurations: based on a managed application, "native" for platform 8.2, and adapted from 8.1, continuing to use outdated technologies and mechanisms. Since a significant part of the configurations (Enterprise Accounting, Payroll and Human Resources) are adapted or transitional, they cannot be discounted, therefore the first part of our article will be devoted to these configurations (in fact, platform 8.1), while in the second we will analyze setting up auto-exchange for configurations based on a managed application (platform 8.2).

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

First of all, we need to configure the exchange nodes. To do this, run the configuration with administrator rights and select Operations - Exchange plans.

In the list that appears, select Full plan or By organization, if one database keeps records of several firms and the exchange needs to be made only for one of them. In the window that opens, one node already exists - the central one, we need to edit it by specifying the code and name.

After that, 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 infobase in file mode. To do this, right-click on the required node and select Create initial image.

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

In the window that opens, click the button Add and set up a new exchange specifying the remote host, the exchange type (via FTP) and the parameters for connecting to the server.

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

Do not forget to specify the node prefix for document numbering (otherwise you will receive different documents with the same numbers) in the Service - 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 be made only if this 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. Then you can start data exchange. For control, you should use Data exchange monitor, it allows you not only to control the success of the upload / download, but also shows the collisions or delayed movements that have arisen (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 efficiently solve various kinds of problems that arise during auto-exchange.

At this point, the exchange setup can be considered complete and you can start working in a distributed mode. Separately, it is worth dwelling on updating or making changes to the configuration. These actions are available only on the central site, all changes made will be automatically propagated to the peripheral sites at the next exchange. To make changes automatically, the peripheral base must be in exclusive mode, otherwise you will need to run Configurator and execute Database configuration update manually.

In 1s 8.3 or in 1C 8.2? Configuring a distributed infobase. Step-by-step instruction.

The distribution of the infobase is used when it is necessary to maintain joint accounting in databases that cannot, for various reasons, have a physical connection. An example is keeping records in one company that has a division in a big city and a small village without the ability to connect to the Internet. Or, in some special cases, the periodic need to simultaneously work with the same database in the office and outside the office, for example at home. In such and similar cases, the use of a distributed information base (RIB) is justified and necessary.


In this article, we will consider the organization of the distribution of one information database in the 1C Accounting for Russia version 8.3 configuration through a local or network directory. In version 8.2 1C, this instruction will also be useful, because describes essentially one process with significantly small differences.

==== Setting up for the main base ====

Having opened 1C 8.3 in the "Enterprise" mode, go to the "Administration" section. In version 1C 8.2, to get started, you need to go to the main menu "Service" - "Distributed information base (RIB)" - "Configure RIB nodes".

Further, we will consider the process in the context of IS version 8.3. So, going to the "Administration" section, select "Program settings". In the settings, go to the "Data Synchronization" section. Here we tick the box "Use data synchronization" and specify the database prefix. We indicate "Central Bank", meaning the central base.

After that, the item "Data Synchronization" appears in the right menu. Let's choose it. In the opened child window, click the "Configure data synchronization" button. In the drop-down menu, you can select settings for different use cases of synchronization. We choose "Distributed Information Base ...".

For general development, get acquainted with the contents of the next window and click "Next".

In the next window, fill in the directory through which it will pass. We will indicate data compression to reduce the size of the upload, and you can immediately specify a password for the archive with data. It is important not to forget him. We confirm the filling with the "Next" button.

The next two windows are for specifying the settings for the cases of exchange via FTP server and via e-mail. As mentioned earlier, we are considering a way to exchange through a directory, so we skip the settings for FTP and email.

The next window is intended for specifying the exchange parameters in the part of the peripheral database. Let's indicate its name and prefix. Next - the "Next" button.

Let's check the exchange parameters we have formed and confirm their correctness with the traditional "Next" button.

The necessary set of settings for the exchange will be automatically created. It will take some time.

Important! It takes a long time to create the initial image for the slave node. The size of this significance depends on the resources of the computer and the volume of accounting in the main database.

Let's say we decided to create an image. After clicking on the "Finish" button in the previous window, we will enter the settings for creating an image of the subordinate information security. We will consider the simplest case for local operations. To do this, we will indicate the required details in the window that opens. Pay special attention to the "Full name of the file base" parameter. It must be specified in full UNC format, which assumes the formation of a local path in the "network" format. For example - "\\ Server1C \ Databases \ RIB". Add the name of the database file to the specified path - 1Cv8.1CD.

After clicking on the "Create initial image" button, the process of generating an image for the subordinate base starts.

After the end of the process, a database file will be created in the specified directory. This newly created base needs to be configured before full use.

==== Setting up for the peripheral base ====

To do this, you need to connect it to 1C. You will find how to do this in the instructions in our article - After connecting, you need to start the new database in the configurator mode and create users. Next, the IB must be started in 1C "Enterprise" mode.

If, for any reason, the creation of users needs to be postponed to a later time, you can simply launch the database in 1C "Enterprise" mode after connecting. You will be prompted to create an Administrator user, agree to it, and the initial population will be completed.

Then you need to continue setting up the pairing with the main base. This setting is similar to the one discussed above for the main base.

A setting for communication with the main base will be created.

============================================

So, now we have created the main and peripheral bases. Synchronization settings have also been created in each of these databases. Now you can proceed to editing these settings and bringing them into a suitable form. You can create automatic exchange rules or perform an exchange manually.

Let's do it in the main database. The peripheral base is configured in the same way.

Editing can be applied to rules and data sync schedule.

By clicking the "Configure" button in the "Data Synchronization Schedule" section, you need to edit the scripts for the automatic work schedule for uploading / downloading data for the selected database. You don't have to edit it, just agreeing with the default options.

To edit the parameters, just click on the link with the data of the automatic schedule. And then we edit the temporary parameters for starting tasks. By clicking on the tabs, you can change both the time and the dates and days of the week of the launch.

By clicking the "Run task" button in the main script window, you can manually start the task.

By clicking the "Configure" button in the "Data Synchronization Rules" section, you can perform operations to change the job start scripts, as well as view the upload / download progress log. The latter is important enough for administering access and monitoring the regularity of exchanges.

Having finished creating and editing scripts for automatic start of distributed database exchange, you can proceed to unloading and then loading data.

This, basically, completes the configuration of the distributed database for the central and peripheral nodes.

Download illustrated instructions

Distributed information base. Step-by-step instruction
Distributed Information Base (RIB) 1C: Enterprise
Creation of a distributed infobase and its configuration
how to set up ribs in 1s 8.2
How to set up a distributed infobase in 1C
How to set up in 1C
How to set up in 1C
Setting up a distributed infobase (RIB) in 1C
An example of setting up an RIB for 1C: Accounting 8
Creation of a distributed infobase and configuration

To create a distributed infobase, you need to enter the program in the "1C: Enterprise" mode. To create nodes of a distributed base in the menu, select: 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 "Exchange plan complete" window will open.

We fill in two records:

We will name the first record "Main node", we will indicate the code "GU",

We will name the second record "Slave node", we will indicate the code "PU".

As you can see from the figure, the first record has an icon with a green circle, this is the “Main node” icon.


To create a copy of the "Main node" infobase, click on the "Subordinate node" and click on the "Create initial image" icon. This will be the "Slave" infobase.


The window "Creating an initial IB image" will open, select "On this computer or on a computer in the local network", click "Next".


In the "Information base directory" field, select the location where the copy of the "Main node" will be installed, click "Finish".


After creating the "Slave node" infobase, the following message will appear:


Click "Ok".

Add the "Slave node" infobase to "1C: Enterprise". We go to the subordinate base 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 "Exchange plan complete" window will open. We see that the "Main node" icon is orange, which means that this node is the main one for the infobase in which we are located.


We make the following settings in both the Main and Subordinate nodes:

1. Add a prefix for the distributed infobase.

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


2. Add the setting for data exchange between nodes:

Open: Service - Distributed Information Base (RIB) - Configure RIB nodes. The "Communication settings" window will open.


Click "Add", the "Data exchange settings" window will open. Enter the "Name" of your setting.


A node will automatically appear in the "Node" field, for "Master node" it will be "Subordinate node", for "Subordinate node" there will be "Master node".

In the "Directory" field, select the folder into which the exchange data will be received; it is best to specify one directory for the main and subordinate databases.

In the "Exchange type" field, configure data transfer between databases: via a file or FTP resource. Let's choose, for example, "exchange 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, do the following:

First, in the database in which the changes were made, click on the "Execute exchange at 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 icon "Execute the exchange at the current setting" and the data will go to the database you want.

2. Consider a variant with an exchange plan "By organization".

The exchange will be carried out for the selected organizations located in the distributed information base.

To create nodes of a distributed base in the menu, select: 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 in two records:

We will name the first record "Main node", we will 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.

The second record will be called "Subordinate node", the code will be "PU", we will indicate the organization.


In all other respects, the setting is absolutely the same as with the "Exchange Plan: Full".

Top related articles