two scripts for full backup. Assumptions: VPN connection to \\server
(samba share) at your house . Client is backing up to local \\server
which run windows
Make the entire thing a scheduled task in c:\windows\tasks. Run two
scripts every other week (alternating) in two directories.
::***************************************
:: on each client
@echo off&setlocal
dixml c: c:\name\images
set t=2&if "%date%z" LSS "A" set t=1
for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('echo.^|date') do (
for /f "tokens=%t%-4 delims=.-/ " %%d in ('date/t') do (
set %%a=%%d&set %%b=%%e&set %%c=%%f))
:: echo Year=[%yy%] Month=[%mm%] Date=[%dd%]
set PATH=%PATH%;C:\Program Files\WinRAR
:: a = archive
:: -p[password] = encrypt contents
:: -hp[password] = encrypt both filenames and contents
:: -r = recursive
:: testola = directory
rar a -hptest -r %computername%_%yy%.%mm%.%dd%.
rar c:\name\images
fsum c:\backup\ /t:r /r
rmdir c:\name\images\
mv %computername%_%yy%.%mm%.%dd%.rar
\\server\images\%computername%\1\%computername%_%yy%.%mm%.%dd%.rar
:: note: the alternate script would mv to \2\
::***********************************
:: on the local image server,
del \\server\%computername%\1\*.rar
cp *.rar \\server\%computername%\1\
::***********************************