Restores the infobase entirely (configuration + data) from a DT file.
⚠️ Irreversible operation. Loading
.dtcompletely overwrites the database — both the configuration and all data. The current contents of the database will be lost. After loading,/db-updateis not needed — the DB configuration is already in sync within the snapshot.
When NOT to use
- You need to create a new database from
.dt→ use/db-create(from a DT template), not loading into an existing one. - You need to update only the configuration (without data) →
/db-load-cfor/db-load-xml.
Usage
/db-load-dt <input.dt> [database]
/db-load-dt backup.dt dev
Procedure before loading
- Suggest that the user first make a
/db-dump-dtof the current state of the database — this is a rollback point (there will be nothing to restore from if it is not saved). - Request explicit confirmation: the entire database (data + configuration) will be overwritten.
- Only after confirmation, perform the load.
Connection parameters
Read .v8-project.json from the project root and resolve the database:
- If the user specified connection parameters (path, server) — use them directly
- If they specified the database by name — search by id / alias / name in
.v8-project.json - If they did not specify — match the current Git branch with
databases[].branches - If the branch did not match — use
defaultPlatform —v8pathof the found database record, otherwise the rootv8path. If it is not set in either place —-V8Pathdo not pass. If the file does not exist — suggest/db-list add. If the used database is not registered — after execution, suggest adding it via/db-list add.
Command
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
No | Platform bin directory, or full path to 1cv8.exe / ibcmd.exe |
-InfoBasePath <путь> |
* | File infobase |
-InfoBaseServer <сервер> |
* | 1C server (for a server infobase) |
-InfoBaseRef <имя> |
* | Infobase name on the server |
-UserName <имя> |
No | User name |
-Password <пароль> |
No | Password |
-InputFile <путь> |
Yes | Path to the DT file |
-JobsCount <N> |
No | Number of background load jobs (0 = by number of processors) |
-UnlockCode <код> |
No | Unlock code (/UC), if session start is blocked |
-AdditionalV8Arguments <список> |
No | Additional launch arguments 1cv8.exe separated by commas, e.g. /UseHwLicenses+ |
-AdditionalIbcmdArguments <список> |
No | Additional arguments ibcmd separated by commas, in the form --ключ=значение |
*— either-InfoBasePathis required, or the pair-InfoBaseServer+-InfoBaseRef
After execution
If the infobase is busy (active sessions), the load will not be performed — for a server infobase you can
pass -UnlockCode; otherwise free the infobase and retry.
Examples
# Файловая база
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\base.dt"
# Серверная база с ускорением загрузки
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-dt.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "base.dt" -JobsCount 4
Related skills
/db-dump-dt— upload the IB to DT (the reverse operation, a rollback point before loading)/db-create— create a new infobase (including from a DT template)