Loads a configuration from a binary CF file into the infobase.
Usage
/db-load-cf <input.cf> [database]
/db-load-cf config.cf dev
Attention: loading CF completely replaces the configuration in the database. Before executing, request confirmation from the user.
Connection parameters
Read .v8-project.json from the project root. Take v8path (path to the platform) and resolve the database:
- If the user specified connection parameters (path, server) — use them directly
- If the user specified a database by name — search by id / alias / name in
.v8-project.json - If not specified — match the current Git branch with
databases[].branches - If the branch did not match — use
defaultIfv8pathis not set — auto-detection:Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1If the file does not exist — suggest/db-list add. If the database used is not registered — after execution, suggest adding it via/db-list add.
Command
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
no | Platform bin directory (or full path to 1cv8.exe) |
-InfoBasePath <путь> |
* | File infobase |
-InfoBaseServer <сервер> |
* | 1C server (for a server infobase) |
-InfoBaseRef <имя> |
* | Database name on the server |
-UserName <имя> |
no | User name |
-Password <пароль> |
no | Password |
-InputFile <путь> |
yes | Path to the CF file |
-Extension <имя> |
no | Load as an extension |
-AllExtensions |
no | Load all extensions from the archive |
*— either-InfoBasePathis required, or the pair-InfoBaseServer+-InfoBaseRef
Return codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (see log) |
After execution
- Read the log file and show the result
- Suggest running
/db-update— loading the CF updates only the "main" configurator configuration; to apply it to the database, you need/UpdateDBCfg
Examples
# Файловая база
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "C:\backup\config.cf"
# Серверная база
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test" -UserName "Admin" -Password "secret" -InputFile "config.cf"
# Загрузка расширения
powershell.exe -NoProfile -File .claude/skills/db-load-cf/scripts/db-load-cf.ps1 -InfoBasePath "C:\Bases\MyDB" -UserName "Admin" -InputFile "ext.cfe" -Extension "МоёРасширение"