Get the best from your windows tools !
NTBackup is the backup tools Microsoft provided with Windows NT4 ! It has been the backup tools up to Windows XP and Windows Server 2003 ! It as been replaced by wbadmin in Windows Vista and Windows Server 2008.
MKSBackup run ntbackup using parameters found in the configuration file and send an email including the status in the subject, the log file, and related events from the Event Viewer.Here is a sample of configuration file.
This job use a file selection stored in selection and will make backup on a shared directory. Every Saturday a full backup, an incremental backup during the week and no backup on sunday. The target file name will have an explicit filename.
The backup can be scheduled from the Task Scheduler.
When the backup is done, MKSBackup send an email report including the ntbackup log and related events from the event viewer.
MKSBackup support only backup to disk operations !
For more information on how to install and start MKSBackup,
visit the Overview page.
When you have installed MKSBackup into C:\Magik\MKSBackup, initialize your C:\Magik\mksbackup.ini like this:
To create the selection file job.bks, start ntbackup, in the Backup panel select the volumes, directories and files you want to backup and store the selection in C:\Magik\job.bks.
Open a command prompt and type the command to check the parameters and the mail configuration.
C:\Magik>C:\Magik\MKSBackup\mksbackup.exe -c C:\Magik\mksbackup.ini checkmail JOB
The check and checkmail commands calculate and display the locations of the destination directories for the next few days.
logging in mksbackup.log
20:48:48,437 INF start version=0.9.0 cmd=['C:\\Magik\\MKSBackup\\mksbackup.exe', '-c', 'C:\\Magik\\mksbackup.ini', 'checkmail', 'JOB']
20:48:48,483 INF cmdline=C:\WINDOWS\system32\ntbackup.exe backup @C:\Magik\job.bks /J JOB /M normal /F S:\test dir\data-full-Sun.bkf /rs:no /v:no /r:no /l:s
20:48:48,483 INF No error in section: JOB
20:48:48,500 INF Destinations day by day:
20:48:48,500 INF Sun 16 May 2010 normal \\nas01\backup\data-Sun.bkf
20:48:48,500 INF Mon 17 May 2010 normal \\nas01\backup\data-Mon.bkf
20:48:48,515 INF Tue 18 May 2010 normal \\nas01\backup\data-Tue.bkf
20:48:48,515 INF Wed 19 May 2010 normal \\nas01\backup\data-Wed.bkf
20:48:48,530 INF Thu 20 May 2010 normal \\nas01\backup\data-Thu.bkf
20:48:48,530 INF Fri 21 May 2010 normal \\nas01\backup\data-Fri.bkf
20:48:48,530 INF Sat 22 May 2010 normal \\nas01\backup\data-Sat.bkf
When everything is OK, start the backup for real using the backup command.
C:\Magik>C:\Magik\MKSBackup\mksbackup.exe -c C:\Magik\mksbackup.ini backup JOB
At the end of the backup you should get something like this.
logging in mksbackup.log
20:57:18,515 INF start version=0.9.0 cmd=['C:\\Magik\\MKSBackup\\mksbackup.exe', '-c', 'C:\\Magik\\mksbackup.ini', 'backup', 'JOB']
20:57:18,562 INF cmdline=C:\WINDOWS\system32\ntbackup.exe backup @C:\Magik\job.bks /J JOB /M normal /F S:\test dir\data-full-Sun.bkf /rs:no /v:no /r:no /l:s
20:57:18,578 INF No error in section: JOB
20:57:18,578 INF start command=backup job=JOB archiver=ntbackup
20:57:26,578 INF end command=backup job=JOB archiver=ntbackup
20:57:26,578 INF name=JOB
20:57:26,578 INF program=ntbackup
20:57:26,578 INF version=0.9.0
20:57:26,578 INF hostname=pcasx
20:57:26,578 INF status=OK
20:57:26,578 INF exit_code=0
20:57:26,592 INF start=Sun May 16 20:57:18 2010
20:57:26,592 INF end=Sun May 16 20:57:26 2010
20:57:26,608 INF logfile=C:\Documents and Settings\asx\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup03.log
20:57:26,625 INF start_epoch=1274036238
20:57:26,625 INF end_epoch=1274036246
20:57:26,625 INF selection=@C:\Magik\job.bks
20:57:26,640 INF type=normal
20:57:26,640 INF target=\\nas01\backup\data-Sun.bkf
20:57:26,655 INF target_size=1389568
20:57:26,655 INF target_mtime_epoch=1274036245
20:57:26,671 INF target_mtime=Sun May 16 20:57:25 2010
20:57:26,671 INF target_free_space=19760758784
20:57:26,687 INF cmdline=C:\WINDOWS\system32\ntbackup.exe backup @C:\magik\job.bks /J JOB /M normal /F \\nas01\backup\data-Sun.bkf /rs:no /v:no /r:no /l:s
You should receive an email report including the ntbackup log and more details. You could have used -d switch to increase logging verbosity and display ntbackup log at the end of the backup.
To schedule your backup, read How to schedule MKSBackup
To use the ntbackup backend, program must be set to ntbackup.
This is the selection of what to backup, this parameter is passed as is to the backend. Possible values are:
The first selects a single directory, the second, notice the @ at the beginning, specifies the name of the backup selection file .bks. You have to create the file using the ntbackup graphical user interface.
This specifies where the backup will be stored and follows the destination syntax. This parameter is related to switch /F of the ntbackup command.
Theses rules tell MKSBackup to do a full backup Sunday and an incremental every two days.
Known backup type are (normal, full, incremental, inc, differential, diff, copy, daily). All of these are a possible values of the /M switch in the ntbackup syntax. inc and diff are shortcut for respectively incremental and differential. full is an alias for normal.
Tapes can be used using the target format: TAPE://TAPE_NAME. When used, /um is added to the ntbackup command line. This is a very limited support. This feature has not been tested by the author.
This is a boolean switch, possible values are yes or no. This is related to switch /SNAP of the ntbackup command that specifies whether the backup must use a volume shadow copy.
verify (optional, default is no)
This is a boolean switch, possible values are yes or no. This is related to switch /V of the ntbackup command.
You can specify additional options using the options parameters. Options will be added to the ntbackup command line. Check your ntbackup help for more info.
Options are separated by spaces. If one option contains space, it must be quoted using double quote charactere ".
options=/a /d "Job Description"
ntbackup (optional, default is %windir%\System32\ntbackup.exe)
You can specify the path of the ntbackup.exe binary. You should never change this except on 64bits system.
When running 32bits MKSBackup on x64 system, ntbackup.exe must be copied into another directory like C:\Magik and ntbackup set to this location ! This is the 64bits trick.
logdir (optional, default is in %USERPROFILE%)
You can set the directory where MKSBackup will search for the last backup report.
You should never change this.
default is %USERPROFILE%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data
logdir=C:\Document and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data
The mail report reproduce the usual structure but can also include the following attachments.
- log.txt This is the ntbackup log file.
- dir.txt This is the listing of the target directory.
- evlog.txt This is a selection of records from the event log related to the backup.
- selection.bks This is the backup selection file (.bks file) used for this backup.