Ways to roll back the 1s 2.0 update. Platform tricks: using vendor configuration. Recovery using the HEX editor

In this article I want to show the service capabilities of the 1C:Enterprise 8 platform, in terms of using the supplier’s configuration, which are very often in demand, but as practice has shown, they are not familiar to all beginners and even experienced specialists.

Let's consider a typical situation in which beginners often find themselves. Let's say there is a typical configuration of 1C: Integrated Automation 8. Initially, the configuration was installed from the distribution kit (let's say release 1.1.20.1). Then, due to the need to adapt to the specifics of the enterprise, the possibility of change was included (newcomers very often mistakenly call this action removal from support, although in fact this is not the case).

And now, after some time, we have a highly modified, but still standard (for the purposes of regulated accounting, we regularly updated) configuration. Let's look at a few hypothetical situations:

1) Some time after the next update, we receive a message from the accounting department about an error that occurs during the routine month-end closing operation. There was no such error before, so the update is to blame. Quite a typical situation. We begin to diagnose the error and see that the legs are growing from the general module Accounting for VAT and Formation of Movements. We begin to understand and understand that this module was significantly redesigned into a standard one and after merging, we “lost” some of the procedures/functions (or, as often happens in standard ones, they “jumped” into another common module). Due to the intricacy of common modules among themselves in standard ones, at the update stage it is not always possible to identify a problem that manifests itself only when users work.

So we understand that in order to figure it out we need a typical configuration of the current release (let’s say 1.1.23.1). But where can I get it? If there is a familiar Frenchman and he can quickly send the distribution kit, great, but let’s assume he is not there, and the problem needs to be fixed urgently. (Do not suggest Varese!). Moreover, there may be no Internet, and what to do in such a situation? I have repeatedly witnessed a process where a person, in order to solve a given problem, installed a new database from the existing initial distribution, and then successively updated it to the latest one in order to see “how it should really be” in a clean database. And the casket, as always, simply opened (IMG:)

Now let's look at different solutions:

a) First option: Menu -> Configuration -> Comparison of configurations, then select the vendor configuration and compare it with the main configuration.

Surprisingly, there are those who don’t know about this. Or, under any circumstances, use the item Compare, combine with the configuration from the file (having previously obtained/received the standard .cf).

b) The second method is suitable if we need to not only see the changes, but also immediately perform the merge.

Menu -> Configuration -> Support -> Support settings and at the bottom click the Compare, merge button.

2) Another situation: let’s say we changed or deleted some piece of standard code, and after a while it turned out that we made a mistake and we need to put everything back. And as often happens, there is no backup of the saved configuration before the changes were made. But we know for sure that this piece of code is contained in the standard code, so the vendor configuration would solve the problem.

Naturally, you can do the same as in the first case. Wait for the comparison process to complete, and from the configuration comparison window, open the standard module and copy the code from there.

Some people do just that, but if we are dealing with a monster like UPP, which is also heavily modified, then we can wait a very long time for the comparison process to complete. If we had a .cf file, we could simply open it in the configuration window (by the way, not all beginners know about this feature either) and copy the required code from there.

And a reasonable question arises: how can you still save the supplier’s configuration to a file? Why is there no menu item similar to Save configuration to file for the main configuration or Save database configuration to file for database configuration. Where is the same for the supplier configuration? In fact, it is there too, only buried a little deeper. Namely, everything is in the same form of support settings.

It’s just that many people open this form only once to enable the change option and never return to it.

And in our case, it was possible to do it even simpler, without even saving the configuration to a file, click the Open button. The effect is the same, but much faster.

Why else might you need to save the supplier configuration to a file?

3) Consider the following situation. Let’s say that at the initial stage of the configuration’s existence, the standard configuration did not have the functionality we needed and a decision was made to improve it. The modification was minimal, but in the future it still created inconvenience when updating. But then, after some time, we discover that this functionality (as was the case with object versioning at one time) appeared in the standard version (and, as often happens, it was implemented an order of magnitude better than the “makeshift” modification).

Let me give you a few more examples of real situations when you may need to roll back to a standard configuration:

1. A couple of times I came across configurations in which only the layouts of printed forms were subject to modification. Due to lack of experience or ignorance, the programmer who maintained the configuration, instead of creating an external printed form, removed the configuration from support and modified the built-in layouts (often trivially to add a company logo), after which users were deprived of the ability to automatically update.

2. Again, due to ignorance of the standard functionality (very often former “seven-year students” suffer from this), instead of using properties and categories, details of directories/documents were added when there was no good reason for this (data, for example, was used only for output to printed forms).

Of course, this is not a problem if we are dealing with UT or another management plan configuration, where updates are generally not critical, but in this example we were talking about modified SCPs or complex automation. And it turns out that due to minor improvements that could have been implemented without removing full support, we have unnecessary hemorrhoids with standard updates.

There is a reasonable desire to abandon the modifications made and put the configuration back into full support. How to do it?

The only way to put the configuration back into full support is to load (not in the compare and merge mode, but rather the Load configuration from file item) standard.cf. This is why we need the ability to save the supplier configuration to a .cf file. We save, then load, and after updating the database configuration, we get the standard configuration in its original form, i.e. with a lock (IMG:) Naturally, before performing these actions, you must take care in advance of saving/transferring the necessary data, which will be “washed away” after returning to the standard configuration, and be sure to make a backup copy of the database!

These are, as it turns out, simple possibilities available to the developer’s arsenal, but ignorance of these techniques in practice can result in many hours of unnecessary fuss described above. So those who knew - well done, and those who didn’t know - take it into service and save your time.

[you must register to view the link]

Software from the 1C company is very popular both among entrepreneurs and government organizations. Programs are used for bookkeeping, management accounting, etc. In order to keep records correctly, any organization must have up-to-date information. Therefore, programs that are developed specifically for the economic needs of an organization cannot function for a long time without updating.

If for some reason it is not possible to use the services of a professional and you will install the update for 1C yourself, you need to read the instructions given below.

Get 267 video lessons on 1C for free:

Be sure to do this before updating.

The first step is to obtain the files that are needed for the update. This can be done in several ways:

  • purchase an information technology disk. Along with the disc, a coupon is provided that gives the opportunity to receive such discs free of charge for six months;
  • download updates for 1C from the Internet. But in this case, you need to have registration data to log in to the ITS website. Therefore, certain difficulties may arise here.

Note! If the configuration installed in your company is not a standard product, that is, it has already been tampered with by 1C programmers, do not try to update the software yourself! You CANNOT update such program versions on your own! This will lead to system instability and data loss!

Detailed instructions for installing updates

Before you start updating the software product, you must completely copy the company's database. Even if an attempt to update the program is unsuccessful, the old version will always be ready to work. To do this, you must follow the following instructions:

  • run the program in configuration mode. This can be done by clicking the “configurator” button in the infobase selection window;
  • after this, you need to open the “administration” item (in the top menu), then click “unload information base”;
  • The “save as” window will open. Here you need to select the directory where you plan to save the information database file, and then click the “save” button;
  • A message will appear indicating that the database was successfully saved. Now you can start updating without fear of negative consequences.

To directly update the program, you need to open the directory where the update was saved and run the setup.exe file. The update will be installed in the default directory.

Next, you need to select the 1C “configurator” window, and in its menu the “configuration” item. The action scheme is as follows: configuration - support - update configuration. A window will open in which you need to select the “Search for available updates (recommended)” section. "Next" button.

A window opens where you can select the update source. It is necessary to uncheck the “http://downloads.v8.1c.ru/tmplts/” flag, since the update in this case does not occur via the Internet network. Again the “next” button.

There may be a pause here, then the available updates window will open. You must select the version number of the new configuration and click the “Done” button.

In the previous article, we discussed the issue of creating backup copies of the 1C Enterprise database using the example of 1C Accounting 8. We found out that one of the backup methods is to create unloading information base. Now let’s figure out what to do with the upload file if suddenly something bad happens to your database.

If the problem cannot be resolved by any other means, it's time to read the instructions then the previously created upload file for 1C Accounting 8 (or any other 1C Enterprise configuration) will allow you to roll back the database, i.e. return infobase state on the date of creation of the upload.

A small digression from the topic: from here it is clear that when restoring the database in this way, part of the data will be inevitably lost. That's why The more often you make backups, the less data you will lose if the 1C database is damaged.

The upload file itself is useless and requires running the Configurator, i.e. You can’t just launch an upload file (like a movie, for example) and expect results. Therefore, we launch the Configurator and go to the Administration menu.


In the menu, select the “Load information base” item, as shown in the figure above. This will open a file selection window.

website_

Using this window, you should select the download file you need. If there are several of them, then they usually choose the freshest one, i.e. done last.

Attention! Be extremely careful when choosing a file if you have several of them. Especially if they belong to different companies! The upload operation cannot be undone.

There was an important part of the article, but without JavaScript it is not visible!

In view of the above, it should be added one important detail- if the database is “covered”, then make a copy of its entire folder ( So what if it’s damaged!) and only then open the Configurator and restore. In case of an error, you can always return to the “unrestored” (i.e., not completely damaged as a result of a recovery error) version of the database.

If a file is selected, the following warning will appear (it is necessary because the operation cannot be cancelled).

website_

If you are sure, click Yes and wait for the process to complete. This operation must not be interrupted! Once the download is complete, a completion message will appear.

website_

In the window shown above, it's easier to click No because We no longer need the configurator. After clicking the No button, the Configurator will close. Now run the program in 1C Enterprise mode and check the functionality of the database. As you can see, there is nothing complicated.

You can also download previously downloaded data to a completely empty database, i.e. no configuration at all. You can create such a database in the same way as described in the corresponding article. The only difference is that in the configuration template selection window you need to select not templates, but the very bottom item, as shown in the figure.

website_

Let me remind you once again: Be careful when restoring the 1C Accounting 8 database with your own hands! You can safely make backups - it’s safe for the data in any case - but be careful with restoration.

The article shows ways to restore a 1C database using tools built into the program or third-party applications. How to create and restore a database backup. For most users of 1C company products, damage or loss of the 1C: Enterprise database is something they are even afraid to talk about. For them, the task of restoring the database seems simply unrealistic, and its loss is a terrible tragedy.

In fact, 1C company products are the same software as any other. Information that users enter into their databases is stored in files that can be backed up or restored if damaged or deleted. Often for this purpose built-in "1C: Enterprise" tools, but you shouldn’t forget about third-party software either.

By default, the infobase directory, in which, in addition to the 1C database file itself, all files that are related to it are saved, is the folder in User Documents:
C:\Users\Username\Documents\InfoBase


This folder stores all files that are related to this database.


These files include:

  • *.1CD– the file of the database itself, which by default is named 1Cv8.1CD. This file includes all the data entered into the database, as well as their configuration;
  • *.cf, *.cfu (*.cfl), *.dt, *.epf (*.erf)– database configuration files;
  • *.log, *.lgf, *.lgp, *.elf– log files;
  • *.cdn– 1C database lock file;
  • *.efd– 1C archive file;
  • *.mft– auxiliary template configuration file;
  • *.st– text template file
  • *.mxl– file of printed forms of the 1C database;
  • *.grs– file of graphic diagrams of the 1C database;
  • *.geo– 1C database geographic schema file.

Signs and causes of damage to the 1C database

Signs of damage to the 1C database can be very diverse, these are failures when working with the database or its sudden closure, freezing, various messages about the presence of errors while working with it or at startup. Often "1C: Enterprise" reporting the presence of an error when performing an operation with the infobase and describing it "...The database file is damaged".

The reasons for damage to the 1C database can be of physical or logical origin.

The consequences of physical causes of damage to databases are the most severe, as they are associated with damage to the storage medium on which the data is stored. This could be damage to the external or built-in hard drive, optical storage media, flash drive or memory card. In this case, in order to be able to restore the 1C database, it is necessary to return the functionality of the storage medium.

Logical damage to databases occurs as a result of software failures, incorrect or sudden shutdown of a computer or storage medium, incorrect operation of network equipment, as well as viruses and malware.


Creating and restoring a 1C database from a backup copy

We have already mentioned this many times in our articles - the best way to save your data is to create a backup copy of it. For the 1C database, this method is also relevant.

To create a backup copy of the 1C database:

To restore a 1C database from a backup:


Restoring a damaged 1C information database

If the information base malfunctions and the errors described above or other symptoms occur, there is no need to panic, since in most cases the 1C database is recoverable. This can be done using the tools built into the platform.

Restoring using the Configurator

To eliminate errors in the 1C database, its configurator provides a function "Testing and fixing...". To use it:


Recovery using chdbfl.exe

In every version of the platform "1C: Enterprise" There is a utility that is designed to debug damaged infobases. There is no access to this utility from the platform's internal menu. But it is installed along with the installation of the platform. To run it, go to the folder where the 1C platform is installed on your computer:
C:\Program Files (x86)\1cv8\8.3.8.1652\bin
(where 8.3.8.1652 is the platform release number (different for different releases))


Find and run the chdbfl.exe file in this folder - this is the 1C infobase debugging utility. After launching the utility, use it to specify the database file by clicking the ellipsis to the right of the field "DB file name", and check the box next to the function “Correct detected errors”. Having set the necessary parameters, click the button "Run".


All detected errors and other actions of the utility will be displayed in the chdbfl.exe window.

Recovery using the HEX editor

In particularly difficult cases or if the previous two methods of debugging the information base did not bring the desired result, it is theoretically possible to restore it using a HEX editor. To do this, you need to open the main *.1CD database file in a HEX editor.

The disadvantage of this method is that this method of fixing a damaged 1C database can only be carried out by experienced specialists who are knowledgeable in HEX.

It should be noted that it has a built-in HEX editor, which can be used to fix damaged files.


How to restore a deleted 1C information database

If, as a result of accidental deletion, reinstallation of the operating system, formatting of the hard drive or other storage medium on which the 1C database was stored, it was lost, then you can restore it using. For this:


Note. In a similar way, you can restore the lost backup file of the 1C information base - 1Cv8.dt.

  • Upload the recovered *.dt file to the information database using the method described above.
  • If the infobase is restored file by file, then open its main file 1Cv8.1CL using the 1C menu File / Open.

All methods of restoring a 1C database described in this article are shown using the platform as an example "1C: Enterprise 8.3". But this information is also relevant for other programs and platform configurations:

  • 1c accounting
  • 1C: Entrepreneur
  • 1C: Salary and personnel management
  • 1C: Trade management
  • 1C: Retail
  • 1C: Holding Management
  • 1C: Enterprise Management
  • 1C: Enterprise. Manufacturing plant management
  • 1C: Complex automation
  • 1C: Document flow
  • 1C: Consolidation
  • 1C: Managing a small company
  • 1C: Taxpayer
  • 1C: Entrepreneur reporting
  • 1C: Payment documents
  • 1C: Accounting of a government institution
  • 1C: Salaries and personnel of a budgetary institution
  • 1C: Set of reports
  • 1C: Budget reporting
  • 1C: Document flow of a government agency
  • 1C: State and municipal procurement
  • 1C: Settlement budget
  • 1C: Municipal budget
  • 1C: Money
  • 1C: E-learning, etc.