Finally i got it working. Windows Batch is really a pain if you use Linux.
https://de.wiki.ryzom.com/wiki/Benutzer:Heernis/Profil-Sicherung# Windows_Script
Thanks Siela for the easy solution ;-)
Thanks Moniq for the inspiration ;-)
Anyone is able to test the script on Windows 10? I used only Windows 7. Thank you!
Windows Script
@echo off
REM Erstellt von Heernis
REM Sicherung des Ryzom Profils
REM Letzte Aktualisierung 02.04.2019
REM Benötigt wird: 7za.exe 7za.dll 7zxa.dll
REM Das Script erstellt bei Ausführung ein monatliche Sicherung.
REM Wenn eine monatliche Sicherung vorhanden, erstellt es eine inkrementelle Sicherung,
REM die nur Veränderungen im Bezug auf die letzte monatliche Sicherung, erstellt.
REM Große Dateien, wie Musik, Mods oder Bildschirmaufnahmen, können per Exclude-Variabel ausgelassen werden.
title Profil-Sicherung
REM Hier nichts verändern!
set day="%date:~0,2%"
set month="%date:~3,2%"
set year="%date:~6,4%"
set hour="%time:~0,2%"
set min="%time:~3,2%"
set sec="%time:~6,2%"
set FULL="%year%-%month%"
set DAILY="%year%-%month%-%day%_%hour%-%min%-%sec%"
REM Einstellungen
set NAME="Ryzom"
set OS="Win7"
set SRC="C:\Users\%username%\AppData\Roaming\Ryzom\"
set DST="C:\Users\%username%\Desktop\"
REM Komprimierungslevel 1(minimal)-9(ultra)
set LEVEL="9"
REM Architektur wählen. Nur eines von beiden darf ohne REM stehen bleiben!
REM set ARCH="win\x86"
set ARCH="win\x64"
REM Alle Bilder auslassen
REM set EXCLUDE1=-xr!*.tga -xr!*.png -xr!*.jpeg -xr!*.jpg -xr!*.gif
REM Alle Audio-Dateien auslassen
REM set EXCLUDE2=-xr!*.mp3 -xr!*.ogg -xr!*.wav
REM Alle Modifikationen auslassen
REM seit EXCLUDE3=-xr!*.dds -xr!*.shape -xr!*.anim -xr!*.ps -xr!*.anim
REM Log und Debug auslassen
REM set EXCLUDE4=-xr!*.cache -xr!*.index -xr!*.string_client.pack -xr!*.string_cache -xr!hsts-list.save
REM set EXCLUDE5=-xr!*.dmg -xr!*.log
REM Lösche alle Cache-Dateien [optional]. Entferne REM, wenn gewünscht.
REM del "%SRC%*.cache" /s /f /q
REM del "%SRC%*.index" /s /f /q
REM del "%SRC%*.pack" /s /f /q
REM del "%SRC%*.string_cache" /s /f /q
REM del "%SRC%*.save" /s /f /q
REM Lösche Log und Debug Dateien [optional]. Entferne REM, wenn gewünscht.
REM del "%SRC%*.log" /s /f /q
REM del "%SRC%*.dmg" /s /f /q
REM Ryzom Sicherung
if not exist %DST%\%NAME%-%OS%_%FULL%.7z (
echo Starte monatliche Sicherung
REM
%ARCH%\7za a %DST%\%NAME%-%OS%_%FULL%.7z %SRC% -mx=%LEVEL% %EXCLUDE0% %EXCLUDE1% %EXCLUDE2% %EXCLUDE3% %EXCLUDE4% %EXCLUDE5%
else (
echo Erstelle aktuelle Sicherung
%ARCH%\7za u %DST%\%NAME%-%OS%_%FULL%.7z %SRC% -ms=off -mx=%LEVEL% -t7z -u- -up0q3r2x2y2z0w2!%DST%/%NAME%-%OS%_%DAILY%.7z %EXCLUDE0% %EXCLUDE1% %EXCLUDE2% %EXCLUDE3% %EXCLUDE4% %EXCLUDE5%
)
echo Fertig
https://de.wiki.ryzom.com/wiki/Benutzer:Heernis/Profil-Sicherung# Windows_Script
Thanks Siela for the easy solution ;-)
Thanks Moniq for the inspiration ;-)
Anyone is able to test the script on Windows 10? I used only Windows 7. Thank you!