Answer the question
In order to leave comments, you need to log in
Is there a script for soft chopping off users from DB 1s in the file version?
the database is in the network storage. Unfortunately, it is not possible to discipline users to leave the database at the right time. you need to cut them off for a while while a backup is being made. and climbing every time with your hands is not automated. any ideas?
Answer the question
In order to leave comments, you need to log in
No. More precisely, of course they are, but the result of their work is about the same as pulling out the power cord from the file cleaner.
And most importantly why? Well, they left the base hanging - what difference does it make to you?
The only normal option is to add processing to the configuration that will run at certain intervals and check if there is a command to force shutdown.
Best of all programmatically in 1C through SessionsLock.
SessionsLock = New SessionsLock;
SessionsLock.Begin = DateTimeSessionLockFrom;
SessionsLock.End = DateTimeSessionLockTill;
SessionsLock.Message = "База архивируется";
SessionsLock.Use = True;
SessionsLock.KeyCode = "KeyForAdmin";
SetSessionsLock(SessionsLock);
7z archiving script:
@Echo Off
echo %date% %time% ***Start***
SetLocal EnableDelayedExpansion
Set $SRC=list_add.txt
Set $EXC=list_excl.txt
Set $DST=F:\Archive1c
Set $PSW=password
Set $COMPR=1
Set $COPIES=20
C:\"Program Files"\7-Zip\7z.exe a -t7z -mhe=on "%$DST%\files%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%.7z" @%$SRC% -scsWIN -p%$PSW% -mx=%$COMPR% -ssw [email protected]%$EXC% >> log_7z.log
For /F "Delims=" %%i In ('DIR /B/O:-N %$DST%\files????-??-??_??-??-??.7z') Do (
Set /A $COPIES-=1
If !$COPIES! LSS 0 DEL "%$DST%\%%i"
)
echo %date% %time% ***End***
xcopy f:\Archive1c\*.* \\na\arсhive\ /h /e /r /y /D
D:\1C_Base\1C_81\TDment\
d:\1C_Base\1C_82\TDment20\
D:\1C_Base\KaminZPment\ZPL2\
Nothing from outside. In UT 10.x time configurations, a mechanism was implemented to shut down users at the application level (that is, at the level of a specific configuration). In the latest releases, as far as I know, it was torn out for some reason. But to implement something like this is quite simple.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question