S
S
Sergey2015-07-02 07:49:55
System administration
Sergey, 2015-07-02 07:49:55

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

4 answer(s)
A
Artem @Jump, 2015-07-02
@edinorog

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.

Y
Yuri Goncharuk, 2015-07-02
@yukon39

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);

For the file base in the directory after the execution of the specified code, the file 1cv8.cdn will appear (I'm not sure about the name). In principle, you can create this file and put it on your own.

M
mr_alex, 2015-07-15
@mr_alex

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

list_add.txt content
D:\1C_Base\1C_81\TDment\ 
d:\1C_Base\1C_82\TDment20\ 
D:\1C_Base\KaminZPment\ZPL2\

list_excl.txt content
You can then specify reindexing.
TS, if the database is file, then users sit through the RDP, that is, set the session to disconnect at midnight and start archiving, and then reindexing the IB.
forum.infostart.ru/forum16/topic83796

K
klis, 2015-07-02
@klis

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 question

Ask a Question

731 491 924 answers to any question