Files
avtoambor/deploy/backup.bat
David Beccue 83a59f1677 Add Windows 7 deploy bundle pipeline
Self-contained zip (dist/avtoambor-deploy.zip) for end users on Windows 7:
double-click install.bat to install Node 16, then start.bat to launch the
server. start.bat self-relaunches minimized so the console window stays out
of the way. Node is pinned to 16.x and several deps downgraded for Win7
compatibility; the unsupported View Transitions hook is dropped from the
root layout. make bundle wraps scripts/make-bundle.sh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 09:38:20 +05:00

33 lines
949 B
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM One-shot backup of data\avtoambor.db into backups\ with a timestamp.
REM The server already takes automatic backups every 5 minutes when something
REM has changed; this script is for an explicit manual snapshot.
chcp 65001 >nul
setlocal
cd /d "%~dp0"
if not exist "data\avtoambor.db" (
echo Файл данных не найден: data\avtoambor.db
pause
exit /b 1
)
if not exist "backups" mkdir backups
REM Build YYYY-MM-DD_HH-MM-SS using WMIC (locale-independent).
for /f "skip=1 delims=" %%a in ('wmic os get LocalDateTime') do if not defined LDT set "LDT=%%a"
set "STAMP=%LDT:~0,4%-%LDT:~4,2%-%LDT:~6,2%_%LDT:~8,2%-%LDT:~10,2%-%LDT:~12,2%"
set "DEST=backups\zamena-masla-gp-%STAMP%.db"
copy /Y "data\avtoambor.db" "%DEST%" >nul
if errorlevel 1 (
echo Не удалось создать резервную копию.
pause
exit /b 1
)
echo Резервная копия сохранена: %DEST%
pause
endlocal