Вход | Регистрация
 
1С:Предприятие :: 1С:Предприятие 8 общая

Восстановление конфигурации из ConfigCacheStorage

Восстановление конфигурации из ConfigCacheStorage
Я
   Очевидно
 
25.12.20 - 16:40
Доброго дня форумчане, получилась ситуация, когда база разработчика (Скульная) была затерта админами. В Базе было много доработок. От базы остался кэш в виде файлов:
ConfigCacheStorage, ConfigCacheVersions, RuntimeCacheStorage, RuntimeCacheVersions.
Вопрос вот в чем, возможно ли каким-то образом из этого файла восстановить хотябы часть cf-ника, с которым работал разраб ?
судя по размеру в нем содержится 1/3 от живого файла cf.
   Очевидно
 
1 - 25.12.20 - 16:41
Поидее его можно как-то подсунуть 1С-ке, в момент обновления но как его подсунуть , если при запуске 1с-ка держит его все время пока работает процесс 1cv8.exe
   Очевидно
 
2 - 25.12.20 - 16:52
т.к. есть .cf с которого разработка началась, видимо надо равзвернуть базу из этого cf, запустить конфигуратор перевести её в измененное состяние, (не сохраненная конфа), и в этот момент как-то ей этот кэш подсунуть ... чтоб при нажатии "сохранить конфигурацию" она с него считала данные. Это предположение конечно. Но как ей подсунуть файл, если она уже держит свой кэш (который инициализировался при открытии конфигуратора) ?
   МихаилМ
 
3 - 25.12.20 - 16:57
эти метаданные можно преобразовать в сф.
разберите в8анпек   конфу  для примера.
в ней будет поток руут
в руут будет ссылка на поток , в котором перечислены по видам метаданные.
в него и нужно будет указать уцелевшие потоки.

и собрать обратно  в8анпек
   Очевидно
 
4 - 25.12.20 - 17:02
(3) хм, попробую, спасибо за наводку !
   Очевидно
 
5 - 25.12.20 - 17:09
(3) и с наступающим 2021 :)
   Очевидно
 
6 - 25.12.20 - 18:50
(3) с CF проблем не возникло, при использовании в8анпака (3 версии перепробовал) :
При попытке сделать анпак получаю "This is not v8 File"
При попытке сначала сделать Inflate получаю пустой файл на выходе
При попытке Парса получаю сначала "File load:ok" а потом опять "This is not v8 File"
   Очевидно
 
7 - 25.12.20 - 18:51
т.е. CF распаковал, запаковал , всё красиво. А вот при попытке провернуть аналогичное с ConfigCacheStorage получаю то что в (6)
   МихаилМ
 
8 - 25.12.20 - 19:19
(7)
я давно не интересовался кишочками 1с83.

думаю , что ConfigCacheStorage это файл аналогичный 1cdb.
и его можно просматривать Tool_1CD.

поэтому прежде сборки метаданных их нужно извлечь чем-то.
либо Tool_1CD (но он устарел и может не работать с современными форматами 1с8) либо его аналогами либо есть 1с компонента для доступа к файловой бд 1с83

в резальтате получите сжатые потоки.
их можно расжать v8unpack , чтобы узнать в какой раздел метаданных поместить поток с описанием метаданных.
тут можно немного покодить чтоб не работать в ручную.

далее сборка , как в (3)


извините , что не подробно раскрыл тему сразу.
   Очевидно
 
9 - 25.12.20 - 19:57
(8) спасибо большое, попробую, обязательно отпишусь !
   Очевидно
 
10 - 26.12.20 - 12:21
В общем пока что ничего не выходит (стопор при попытке извлечь метаданные из этого ConfigCacheStorage) что пробовал платформа была (8.3.14.1779) :
- Tool_1CD (жалтая): "Длина файла базы не кратна длине блока (0x1000)"
- Tool_1CD (синяя): "Файл не является базой 1С (Сигнатура не равная "1CDBMSV8")"
- 1С-ная "CNVDBFL" (ключ -i): "Файл не является файлом базы данных ....1CD"
- Внешняя компонента (открытый проект под лицензией "GPL v2") : так и не установилась (типовой метод 1С говорит ВК установлена но не подключена, regsvr32 говорит "Модуль загружен, но точка входа ... не найдена. Проверьте что ...dll является правильным файлом DLL". (Пробовал под админскими правами и х32 и х64. Один раз прошло дальше но 1С упала с сообщением типа "Неправильная работа с памятью"
   МихаилМ
 
11 - 26.12.20 - 13:38
исправьте сигнатуру на 1CDBMSV8
   Очевидно
 
12 - 26.12.20 - 14:00
(11) исправил вручную, получил :
- Tool_1CD (синяя): "Неподдерживаемая версия базы 1С"
- 1С-ная "CNVDBFL" (ключ -i): "Не совместимая версия файла базы данных ....1CD"
   Очевидно
 
13 - 26.12.20 - 14:01
(11) похоже он чем-то запакован/зашифрован, т.к. визуально сильно отличается от обычного рабочего *.1CD.
но в8анпак при попытке инфлейта выдаёт пустой файл
   Ёпрст
 
14 - 26.12.20 - 14:03
   Очевидно
 
15 - 26.12.20 - 14:06
Живой 1CD выглядит примерно так :
"1CDBMSV8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  я                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              э  Ѓ           M         c   Г                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Д ru_RU                           (                        
                                 !   #   %   '   )   +   ,   -   .   /   0   2   3   :   ;   <   =   @   B   D   G   H   J                                                             – {"IBVERSION",0,
{"Fields",
{"IBVERSION","N",0,10,0,"CS"},
{"PLATFORMVERSIONREQ","N",0,10,0,"CS"}
},
{"Indexes"},
{"Recordlock","0"},
{"Files",4,0,0}
"
,а ConfigCacheStorage так :

"    ж.        ъї    
000000000014FC40 0000000000010000 000000000026E075
тн     ‘н     яяяяяяяяД*ї
    g+ї
    яяяяяяяя4ЂФ    УЂФ    яяяяяяяяdћє    џє    яяяяяяяяеZ^    €[^    яяяяяяяяxґg     µg     яяяяяяяя    •     Ё•     яяяяяяяяЗ€µ    j‰µ    яяяяяяяяQ<v    ф<v    яяяяяяяя‚"
   Ёпрст
 
16 - 26.12.20 - 14:07
   Очевидно
 
17 - 26.12.20 - 14:16
(14) спасибо за наводки
V8Unpack 2.0 (parse) : "File load ok! This is not v8 file"
Пробовал и с сигнатурой и без.
(16) буду пробовать, спасибо!
   ДедМорроз
 
18 - 26.12.20 - 14:57
Так по идее же,1сд это контейнер,а в нем части,а в кеше эти же части,но без объединения в файл,если найти что и куда,то можно собрать,и по идее,там будет все.
   МихаилМ
 
19 - 26.12.20 - 15:06
посмотрел  ConfigCacheStorage. на 1cd не похож. возможно теперь 1с хранит в формате SQLite или в своём.
но потоки видно и извлечь их можно.
   Очевидно
 
20 - 26.12.20 - 15:16
(19) начал копать какие ещё кэши есть ... накопал такое вот :
Есть файл по такому пути :
"C:\Users\user\AppData\Local\1C\1cv8\<Id базы>\<Id пользователя>\vrs-cache\cache.1cd"
Похоже что это файл кэша исполняемых модулей, последнего запуска 1С, и он через синий 1C_tools открывается. в нем есть потоки по всем модулям, которые выполнялись последним запуском похоже, и они читабельны (т.е. часть "Потоков" можно взять оттуда") , но он всего 30 мб и я боюсь это капля в море. (Видимо последний запуск отладки того что там разрабатывал парень). это уже неплохо, но конечно вопрос про ConfigCacheStorage пока что открыт.

"Потоки видно и можно извлечь" - я правильно понимаю что он у вас примерно как в (15) ? каким образом их можно оттуда извлечь ? (хотябы направление) ?
   Очевидно
 
21 - 26.12.20 - 15:18
(18) дело в том что файл "ConfigCacheStorage" без расширения, и утилиты для *.1cd пока что от него нос воротят ...
   МихаилМ
 
22 - 26.12.20 - 15:20
(21)
направление : посмотреть структуру данных, выявить ключевые разделители , по ним вычислить и получить данные.
   Очевидно
 
23 - 26.12.20 - 15:35
(22) спасибо, в общем структура похоже понятная, разделители похоже тоже видны ... но как привести нечто типа:
"0000000000000070 0000000000000200 FFFFFFFFFFFFFFFF
{ї{µЎ/Wµ1€ і t t’“LM’-L’u-
Н tM’,LtM-“t
НMЌLS,-S“ju”.Мё°чbУ…­6_lё°бbЫ…ы/Lє°лВо‹}ЫЃв{/lP›    T¬4Ч –—«H                                                                                                                                                                                                                                                                                                                                                                                                                 
"
в код модуля ?
   МихаилМ
 
24 - 26.12.20 - 15:43
(23)
в общем случае разжать deflate и уже смотреть , что там внутри
   Очевидно
 
25 - 26.12.20 - 15:43
(24) ясно, спасибо, буду пробовать
   Ёпрст
 
26 - 26.12.20 - 16:29
Короче, все банальней. Файлик ConfigCacheStorage переименуй в ConfigCacheStorage.cf и текущую конфу объединяй с этим..усё
   Очевидно
 
27 - 26.12.20 - 16:56
(26) блин, я уже почти упал от радости, неужто так сработает )) что-то пошло нетак ...
Если сравнить/объединить:

Ошибка при выполнении файловой операции  'C:\Users\user\Desktop\ConfigCacheStorage.cf'
по причине:
Неверный формат хранилища данных 'file://C:/Users/user/Desktop/ConfigCacheStorage.cf'

Если просто открыть из конфигуратора:

Неклассифицированная ошибка документа.
по причине:
Ошибка при выполнении файловой операции  'C:\Users\user\Desktop\ConfigCacheStorage.cf'
по причине:
Неверный формат хранилища данных 'file://C:/Users/user/Desktop/ConfigCacheStorage.cf'
   Ёпрст
 
28 - 26.12.20 - 16:58
(27) а у меня работает
   Очевидно
 
29 - 26.12.20 - 16:59
... хотя форматы файлов очень , очень похожи !! заголовки разные ... а внутри все тоже самое с такими же разделителями ... ща похимичу с заголовками
   Ёпрст
 
30 - 26.12.20 - 17:08
А чего ты просто кеш не подсунешь, раз он у тебя есть? И как вы в скуле умудрились конфу прибить, а кеш оставить? Табличку конфиг и конфигсэйв подменили в скуле что ле?
 
 Рекламное место пустует
   Ёпрст
 
31 - 26.12.20 - 17:09
А ясно, дочитал (0) просто дропнули в скуле базу..
   Ёпрст
 
32 - 26.12.20 - 17:12
Тупо создай конфу, сделай изменения, прибей процесс, подмени кешу..пробуй
   Очевидно
 
33 - 26.12.20 - 17:16
(32) ща буду пробовать, спасибо большое ... я уже почти отчаялся с попытками распаковки
   Ёпрст
 
34 - 26.12.20 - 17:24
(33) распаковать можешь какой- нить вк, типа геймвиффайре..там есть методы для дефлэйт
   Очевидно
 
35 - 26.12.20 - 17:33
(34) вобщем создал конфу, сделал изменения, прибил процесс, подменил кэш, запускаю конфигуратор ... кэш сбросился в 0 ...
   Очевидно
 
36 - 26.12.20 - 17:39
(34) а вы в (26) на файловой или скульной делали ? и какай платформа ?
   Очевидно
 
37 - 26.12.20 - 17:39
*какая
   Ёпрст
 
38 - 26.12.20 - 17:53
(36) c телефончика, нашел первый попавшийся кеш, переименовал и с ним конфа сравнивается, правда..метаданных в нем нет)
   Ёпрст
 
39 - 26.12.20 - 17:53
В общем, через вк надо распаковать и смотреть, че там унутри
   Ёпрст
 
40 - 26.12.20 - 17:54
Компа нет под рукой, с телефона тоскливо пальцем мышку двигать
   Ёпрст
 
41 - 26.12.20 - 18:09
8.3.17.1549
   Очевидно
 
42 - 26.12.20 - 18:10
(40) ясно, буду дальше тыркать, если что получится отпишусь, спасибо за варианты !
   Очевидно
 
43 - 26.12.20 - 18:11
(41) и с наступающим ! добра вам в новом году !


Список тем форума
Рекламное место пустует  Рекламное место пустует
ВНИМАНИЕ! Если вы потеряли окно ввода сообщения, нажмите Ctrl-F5 или Ctrl-R или кнопку "Обновить" в браузере.