backup improvements

This commit is contained in:
deffcolony
2024-07-11 22:56:56 +02:00
parent f4843c4d03
commit 1d7a9ba9ad
3 changed files with 23 additions and 15 deletions

View File

@@ -3070,12 +3070,12 @@ if "%editor_text_completion_choice%"=="1" (
)
) else if "%editor_text_completion_choice%"=="2" (
set "caller=editor_text_completion"
if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" (
call %editor_text_completion_dir%\edit_ooba_modules.bat
if exist "%editor_text_completion_dir%\edit_koboldcpp_modules.bat" (
call %editor_text_completion_dir%\edit_koboldcpp_modules.bat
goto :editor_text_completion
) else (
echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path%
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset%
echo [%DATE% %TIME%] ERROR: edit_koboldcpp_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path%
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_koboldcpp_modules.bat not found in: %editor_text_completion_dir%%reset%
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair...
git pull
pause
@@ -3083,12 +3083,12 @@ if "%editor_text_completion_choice%"=="1" (
)
) else if "%editor_text_completion_choice%"=="3" (
set "caller=editor_text_completion"
if exist "%editor_text_completion_dir%\edit_ooba_modules.bat" (
call %editor_text_completion_dir%\edit_ooba_modules.bat
if exist "%editor_text_completion_dir%\edit_tabbyapi_modules.bat" (
call %editor_text_completion_dir%\edit_tabbyapi_modules.bat
goto :editor_text_completion
) else (
echo [%DATE% %TIME%] ERROR: edit_ooba_modules.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path%
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_ooba_modules.bat not found in: %editor_text_completion_dir%%reset%
echo [%DATE% %TIME%] ERROR: edit_tabbyapi_modules.bat.bat not found in: %editor_text_completion_dir% >> %logs_stl_console_path%
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] edit_tabbyapi_modules.bat not found in: %editor_text_completion_dir%%reset%
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Automatic Repair...
git pull
pause

View File

@@ -15,6 +15,8 @@ for /d %%d in ("%st_install_path%\data\*") do (
)
)
echo Detected accounts:
echo ================================
REM Remove the trailing pipe character
set "user_folders=%user_folders:~0,-1%"
@@ -22,11 +24,12 @@ REM Split user_folders into an array
set i=1
set "user_count=0"
for %%a in (%user_folders:|= %) do (
echo !i!. %%a
echo !i!. %cyan_fg_strong%%%a%reset%
set "user_folder_!i!=%%a"
set /a i+=1
set /a user_count+=1
)
echo ================================
REM If only one user folder is found, skip the selection
if %user_count%==1 (
@@ -37,6 +40,7 @@ if %user_count%==1 (
:select_user_folder
REM Prompt user to select a folder
echo 0. Cancel
echo.
set "selected_user_folder="
set /p user_choice="Select a folder to backup: "

View File

@@ -1,11 +1,14 @@
@echo off
:restore_backup
title STL [RESTORE-BACKUP]
title STL [RESTORE BACKUP]
cls
echo %blue_fg_strong%/ Home / Toolbox / Backup / Restore Backup%reset%
echo ---------------------------------------------------------------
echo List of available backups:
echo =========================
echo Available backups:
echo ================================
setlocal enabledelayedexpansion
set "backup_count=0"
@@ -14,9 +17,10 @@ for %%F in ("%st_backup_path%\st_backup_*.7z") do (
set "backup_files[!backup_count!]=%%~nF"
echo !backup_count!. %cyan_fg_strong%%%~nF%reset%
)
echo =========================
set /p "restore_choice=(0 to cancel)Enter number of backup to restore: "
echo ================================
echo 0. Cancel
echo.
set /p "restore_choice=Select backup to restore: "
if "%restore_choice%"=="0" goto :backup