ntbackup to disk retention

Posted on 2009-04-21
Last Modified: 2012-05-06
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

Question by:MrBabbage
    LVL 6

    Expert Comment

    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




    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..
    LVL 3

    Accepted Solution

    ::Could you not write a simple batch file


    @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:


    ::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


    Author Comment

    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?

    Author Closing Comment

    A good solution that works well for smaller files but its a bit slow for my application (400GB+)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
    A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
    To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
    This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now