ntbackup to disk retention

I am looking to implement a simple backup to disk solution using ntbackup.  Currently it overwrites the backup each night.  Is there a way of configuring it to write to a new file and keep the previous one as well or retain a certain number of backups before starting to overwrite?
This is what I currently have in place:
 
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\Daily Backup.bks" /n "Daily Backup.bkf created 19/04/2009 at 13:56" /d "Set created 19/04/2009 at 13:56" /v:no /r:no /rs:no /hc:off /m normal /j "Daily Backup" /l:s /f "Z:\FRS_Backups\MCL02\Daily Backup.bkf"

Open in new window

MrBabbageAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
bobsyeruncleConnect With a Mentor Commented:
::Could you not write a simple batch file


::E.g:

@echo off

set day=%date:~0,2%
set month=%date:~3,2%
set year=%date:~6,4%

::Then run the ntbackup comand line with the destination as:

C:\Backup\%day%-%month%-%year%\

::Then you could have another part of the script to delete files older than x days, I use Robocopy (free tool from MS) to do this:

robocopy.exe C:\Backup C:\TempBackup /E /MOV /MINAGE:7
rmdir /S /Q C:\TempBackup




0
 
vertsyeuxCommented:
Hi, I have two ways of doing this.. All my clients' systems create a zipfile backup of their datafiles.. I wrote two little programs years ago in M$ C called DFDAY.EXE and DFDATE.EXE.. the former renames the backup using the current date, the latter to the day of the week..

For example

DFDATE G:\BACKUPS\DAILY.ZIP  renames it to G:\BACKUPS\21APR09.ZIP

and

DFDAY G:\BACKUPS\DAILY.ZIP renames it to G:\BACKUPS\TUE.ZIP

I upload the latter to my FTP site, so I always have the past 7 days backups for all my clients in case they are not making backups themselves..

Let me know if you want a zipfile with the utilities in it..
0
 
MrBabbageAuthor Commented:
Bobsyeruncle I can see how your solution would work but its a bit of a slow process for the number/size of files I have here and robocopy seems to like leaving the files locked which is a problem.

Does anyone know how to get ntbackup to retain say the last two or three backups?
0
 
MrBabbageAuthor Commented:
A good solution that works well for smaller files but its a bit slow for my application (400GB+)
0
All Courses

From novice to tech pro — start learning today.