On Sunday, October 17, 2004, 19:55:11, Wayne Howard wrote:
> Does anyone know if there is a way to automate a backup either via the
> interface or via the command line?
I use a Windows .cmd (formerly known as .bat files) script to back up some
of my applications:
----------------------8<--snip-----------------------------------------
:: backup script for windows registry keys and some files
:: with date in backup filename
:: Build a DTS variable
:: Using for/do, pull apart the output of date/t
set parsearg="eol=; tokens=1,2,3* delims=., "
for /F %parsearg% %%i in ('date/t') do set dts=%%k%%j%%i
:: set program paths and folder locations
set winzipcall=C:\Programme\Utils\WinZip\wzzip
set regeditcall=C:\Windows\regedit
set xcopycall=C:\Windows\system32\xcopy
set tempdir=C:\Dokumente und Einstellungen\Roman\Lokale Einstellungen\Temp\
set backupdir=E:\backup\automated\
%regeditcall% /e "%tempdir%thebat.reg" "HKEY_CURRENT_USER\Software\RIT"
%regeditcall% /e "%tempdir%putty.reg" "HKEY_CURRENT_USER\Software\SimonTatham"
%regeditcall% /e "%tempdir%agent.reg" "HKEY_CURRENT_USER\Software\Forte"
%regeditcall% /e "%tempdir%kerio.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\Kerio"
%regeditcall% /e "%tempdir%opera.reg" "HKEY_CURRENT_USER\Software\Opera Software"
%regeditcall% /e "%tempdir%passwordsafe.reg" "HKEY_CURRENT_USER\Software\Counterpane
Systems"
%regeditcall% /e "%tempdir%k9.reg" "HKEY_CURRENT_USER\Software\KeirNet\"
%winzipcall% -a -t -en "%backupdir%tcpip_reg_%dts%.zip" "%tempdir%*.reg"
%xcopycall% "D:\Miranda\roman.dat" "%tempdir%" /y
%winzipcall% -a -en "%backupdir%miranda_%dts%.zip" "%tempdir%roman.dat"
%winzipcall% -a -en -r -p %backupdir%thebat_%dts%.zip "C:\Programme\tcpip\thebat"
%winzipcall% -a -en -r -p %backupdir%agent_%dts%.zip "C:\Programme\tcpip\Agent"
%winzipcall% -a -en -r -p %backupdir%k9_%dts%.zip "C:\Programme\tcpip\K9 AntiSpam"
%winzipcall% -a -en -r -p %backupdir%kerio_%dts%.zip "C:\Programme\tcpip\Kerio
Personal Firewall"
%winzipcall% -a -en -r -p %backupdir%putty_%dts%.zip "C:\Programme\tcpip\Putty"
%winzipcall% -a -en -r -p %backupdir%passwordsafe_%dts%.zip "D:\Eigene
Dateien\config\roman_pws.dat"
%winzipcall% -a -en -r -p %backupdir%wincmd_%dts%.zip "D:\Eigene
Dateien\config\wcx_ftp.ini" "D:\Eigene Dateien\config\wincmd.ini"
%winzipcall% -a -en %backupdir%outlook_%dts%.zip "C:\Dokumente und
Einstellungen\Roman\Lokale Einstellungen\Anwendungsdaten\Microsoft\Outlook\Outlook.pst"
:: clean up
del "%tempdir%*.reg"
----------------------8<--snip-----------------------------------------
You will probably have to alter the lines
set parsearg="eol=; tokens=1,2,3* delims=., "
for /F %parsearg% %%i in ('date/t') do set dts=%%k%%j%%i
because they depend on the locale of your system.
You need the WinZip command line add-on.
Make a link on your desktop or run this automated.
Regards, Roman
--
According to the obituary notices, a mean and unimportant person never
dies.
________________________________________________
Current version is 3.0.1.33 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html