
This article is for system admins only.
The user performing the configuration upgrade must have administrative privileges and the right to open external reports and processors.
You can upgrade your AccountingSuite configuration not only through the UI but also from the command line. This is especially handy if you want to automate upgrades across one or more databases. This article walks you through automating your database update process using Windows batch files. The same approach and commands can be applied to Unix-like systems with minor adjustments. Below are two batch scripts: one for upgrading a file-based 1C database and one for a server-based 1C database:
BAT-script for file database update automation #
@echo off
chcp 1251
:: — Your settings —
set ENGINE=”C:\Program Files\1cv8\8.3.27.1859\bin\1cv8.exe”
set DB_DIR=”C:\Users\afsh\Documents\1C\AccountingSuite_2_26_7_14″
set EPF_DIR=”C:\Users\afsh\Desktop\DemobaseFunctions.epf”
set BASENAME=”acs”
set USER=”Administrator”
set PASSWORD=”1qazxsw2″
set CFU_FILE=”C:\Users\afsh\Desktop\AccountingSuite_2_26_8_30.cf”
set BACKUP_DIR=”C:\Users\afsh\Desktop\Backups”
set LOG_FILE=”C:\Users\afsh\Desktop\Logs\update.log”
:: Date and time
set VDATE=%date:~-4%%date:~3,2%%date:~0,2%
set VTIME=%time:~0,2%%time:~3,2%
:: — Backup copy —
echo [%date% %time%] Backuping…
if not exist %BACKUP_DIR% mkdir %BACKUP_DIR%
robocopy %DB_DIR% %BACKUP_DIR%\%BASENAME%%VDATE%%VTIME% /E /MT:8
:: — Configuration update —
echo [%date% %time%] Updating configuration…
%ENGINE% CONFIG /F%DB_DIR% /N%USER% /P%PASSWORD% ^
/UpdateCfg %CFU_FILE% ^
/UpdateDBCfg -Dynamic- -SessionTerminate force ^
/Out %LOG_FILE% /DisableStartupMessages /DisableStartupDialogs
:: — 1C client start after update to process update hooks —
echo [%date% %time%] Processing update hooks…
%ENGINE% ENTERPRISE /F%DB_DIR% /N%USER% /P%PASSWORD% ^
/C”StartInfobaseUpdate” ^
/Out %LOG_FILE% /DisableStartupMessages /DisableStartupDialogs ^
/Execute%EPF_DIR%
echo [%date% %time%] Backuping process is finished.
pause
BAT-script for Server Database Update Automation #
@echo off
chcp 1251
:: — Your settings —
:: Path to the platform thick client. The version of the client should be the same as the version of the server.
set ENGINE=”C:\Program Files\1cv8\8.3.27.1859\bin\1cv8.exe”
:: 1C server hostname
set CLUSTER=DESKTOP-JMDOBRI
:: Path to the auxillary external processor
set EPF_DIR=”C:\Users\afsh\Desktop\DemobaseFunctions.epf”
:: Database name in the 1c cluster
set BASENAME=acs
:: Privelliged user name and password
set USER=”Administrator”
set PASSWORD=”1qazxsw2″
:: Path to the new configuration file (cf or cfu)
set CFU_FILE=”C:\Users\afsh\Desktop\AccountingSuite_2_26_8_30.cf”
:: Update log directory
set LOG_FILE=”C:\Users\afsh\Desktop\Logs\update.log”
:: Date and time
set VDATE=%date:~-4%%date:~3,2%%date:~0,2%
set VTIME=%time:~0,2%%time:~3,2%
:: ———- Attention! ———————
:: You should create backup copy of your database with DBMS before update.
:: <<<<>>>>>>
:: — Configuration update —
echo [%date% %time%] Updating configuration…
%ENGINE% CONFIG /S%CLUSTER%/%BASENAME% /N%USER% /P%PASSWORD% ^
/UpdateCfg %CFU_FILE% ^
/UpdateDBCfg -Dynamic- -SessionTerminate force ^
/Out %LOG_FILE% /DisableStartupMessages /DisableStartupDialogs
:: — 1C client start after update to process update hooks —
echo [%date% %time%] Processing update hooks…
%ENGINE% ENTERPRISE /S%CLUSTER%/%BASENAME% /N%USER% /P%PASSWORD% ^
/C”StartInfobaseUpdate” ^
/Out %LOG_FILE% /DisableStartupMessages /DisableStartupDialogs ^
/Execute%EPF_DIR%
echo [%date% %time%] Updating process is finished.
pause