MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
29 30          
2020
Months
NovDec


Sun, Jul 13, 2008 3:04 pm

Scheduling NTBackup for a Daily Backup

The NTBackup utility comes with Windows NT, 2000, Server 2003, Small Business Server (SBS) 2003, and Windows XP. NTBackup is not installed by default with Windows XP Home Edition, but is available on the Windows XP installation disc. Microsoft has replaced NTBackup in Windows Vista.

NTBackup backs up files to a proprietary BKF format. With Windows XP and later, it can even backup open files using Volume Shadow Copy, aka Volume Snapshot Service (VSS)..

To create a backup process that runs every week on a specific day to backup a folder on a system, you can create a batch file similar to the following:

@echo off

REM NTBackup batch file for ACCI folder

REM Set date variable
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%a-%%b-%%c)
date = %date%

ntbackup backup D:\ACCI /J "ACI" /V:No /M Normal /Snap:on /f "F:\ACI\Backups\Current\ACCI_Weekly_%date%.bkf"

The above batch file, which I've named acci-weekly.bat will backup the D:\backup on the system on which it is run. The files will be backed up to F:\ACI\Backups\Current\ACCI_%date%.bkf. The %date% variable is set by the code below:

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%a-%%b-%%c)
date = %date%

The %a variable holds the month, %b holds the day, and %c holds the year. Files will be created with names in the form ACCI_Weekly_07-12-2008.bkf.

The other parameters used are as described below:

/J {"JobName"}
Specifies the job name to be used in the backup report. The job name usually describes the files and folders you are backing up in the current backup job.

/V:{yes | no}
Verifies the data after the backup is complete.

/M {BackupType}
Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily.

/SNAP:{on | off} Specifies whether or not the backup should use a volume shadow copy.

/F {"FileName"}
Logical disk path and file name. You must not use the following switches with this switch: /P /G /T.

Further information on the options availabe with the ntbackup command can be obtained by running ntbackup /? from a command prompt.

By specifying normal as the backup type, all of the files in the folder will be backed up. If the folder occupies a large amount of disk space and will take a considerable amount of time to backup, you may not want to backup all of the files every day.

In this case I would run a normal backup on Sundays, but an incremental backup every other day. So I have a second batch file, acci.bat.

@echo off

REM NTBackup batch file for ACCI folder

REM Set date variable
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%a-%%b-%%c)
date = %date%

ntbackup backup D:\ACCI /J "ACI" /V:No /M Incremental /Snap:on /f "F:\ACI\
Backups\Current\ACCI_%date%.bkf"

To run the batch file that performs the incremental backup every day, you can use the at command.

C:\Documents and Settings\Administrator>at 19:30 /every:m,t,w,th,f,s d:
\backups\acci.bat
Added a new job with job ID = 1

The above command schedules the backup to run every night, Monday through Saturday, at 7:30 P.M. The backup is an incremental backup. An incremental backup is a backup that copies only those files created or changed since the last normal or incremental backup. It marks files as being backed up by clearing the archive attribute on files. If you use a combination of normal and incremental backups to restore your files, you will need to have the last normal backup and all incremental backup sets.

You can check scheduled jobs by running the at command with no parameters. You can get help on the command with at /?.

C:\Documents and Settings\Administrator.mayberry>at
Status ID   Day                     Time          Command Line
-------------------------------------------------------------------------------
        1   Each M T W Th F S       7:30 PM       d:\backups\acci.bat

To schedule the job that runs once a week on Sunday, I can use at 19:30 /every:su d:\backups\acci_weekly.bat.

For a full restoral from the backups, I would need to restore first from the weekly normal backup and then restore from each of the incremental backups from that week.

[/os/windows/utilities/backup/ntbackup] permanent link

Sat, Nov 11, 2006 2:35 pm

Backup Failure Because of 4 GB File Size Limitation

I found this morning that a backup I had run to backup the Exchange Information Store on a Windows server had failed because I was backing up the data to an external USB drive that was formatted with the FAT32 filesystem rather than the NTFS filesystem. The Exchange Information Store .edb file was about 18 GB in size, but FAT32 volumes don't support files sizes greater than 4 GB.

[ More Info ]

[/os/windows/utilities/backup/ntbackup] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo