Fetching contributors…
Cannot retrieve contributors at this time
49 lines (38 sloc) 1.56 KB
@echo off
:: +-------------------------------------------------------------------------
:: |
:: | WPN-XM Server Stack - Backup Script
:: |
:: +-----------------------------------------------------------------------<3
:: Define the folders to backup
:: Define one or multiple folders to backup in the backup-folders file,
:: located at \bin\backup\backup-folders.txt
:: Put each folder on a new line.
:: Folders must end with a backslash (\).
:: When a space is in the path, use quotes, like so "c:\Pa th\".
set source="@.\bin\backup\backup-folders.txt"
:: Target Folder for Backups
:: The folder must end with backslash (\).
set backup_folder="C:\Backup\"
:: Temporary Working Dir
set working_folder="C:\Windows\Temp\"
set logfile=".\logs\backup.log"
:: Set Compression Level
set "fastest=-mx1 -md=64k -mfb=32 -ms=8m"
set "fast=-mx3 -md=1m -mfb=32 -ms=128m"
set "normal=-mx5 -md=16m -mfb=32 -ms=2g"
set "maximum=-mx7 -md=32m -mfb=64 -ms=4g"
set "ultra=-mx9 -md=64m -mfb=64 -ms=4g"
:: The following settings are available:
:: %fastest% %fast% %normal% %maximum% %ultra%
set compression=%normal%
:: multithreading (number of CPU cores to use)
set cores="-mmt="%NUMBER_OF_PROCESSORS%
echo Backup >> %logfile%
echo started -- %date% %time% >> %logfile%
echo running... >> %logfile%
.\bin\tools\7za.exe u -t7z %backup_folder%backup_%date%.7z %cores% %compression% -up1q3r2x1y2z1w2 -ssw -o%working_folder% %source%
echo finished -- %date% %time% >> %logfile%
echo ------------------------------------------- >> %logfile%
echo. >> %logfile%