Soldato
NEVER MIND, YOUTUBE VIDEO TO THE RESCUE
Last edited:
I know you've already answered it.. but we use ExpressMaint (free) for scheduled backups. It runs each night as a scheduled task and is automatically compressed with 7-zip ready to be copied to our backup FTP server. All done through batch files .
@echo off
echo DBNAME - Reindexing..
expressmaint -S (local) -D DBNAME -T REINDEX -R C:\DBNAME\Backups\Database\MSSQL\Backups\reports -RU DAYS -RV 1
echo DBNAME - Updating statistics..
expressmaint -S (local) -D DBNAME -T STATSFULL -R C:\DBNAME\Backups\Database\MSSQL\Backups\reports -RU DAYS -RV 1
echo DBNAME - Performing full backup..
ExpressMaint -S (local) -D DBNAME -T DB -R C:\DBNAME\Backups\Database\MSSQL\Backups\reports -RU WEEKS -RV 1 -B C:\DBNAME\Backups\Database\MSSQL\Backups -BU DAYS -BV 31 -V -C
rem Compress with 7zip
CD Backups\DBNAME
echo.
echo DBNAME - Compressing all .bak files and moving to \compressed
for /f %%a IN ('dir /b *.bak') do "../../7za" a -mx9 compressed\%%a.7z %%a
echo DBNAME - Moving all uncompressed .bak files to \uncompressed
for /f %%a IN ('dir /b *.bak') do move %%a uncompressed
CD ../../