Link to home
Create AccountLog in
Storage

Storage

--

Questions

--

Followers

Top Experts

Avatar of SuprSpy79
SuprSpy79

ntbackup batch files
I have an external usb drive to backup a server. I want to make a new file each day for two weeks, and then have it start overwriting the oldest one. I dont think this is possible with the native ntbackup interface but from what I have read it looks like it is possible with a batch file that does the moving and deleting and then letting ntbackup launch from it.

I need to make a single icon on the desktop for the end user (idiot proof) so they can launch the backup and see a message when its done.

Any help would be greatly appreciated

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of knightEknightknightEknight🇺🇸

What is the command you are currently using to create backups?  Also, to be specific, you want a maximum of 14 files (days) stored on the USB drive, correct?

Avatar of SuprSpy79SuprSpy79

ASKER

well what im doing now is i created a backup using the wizard, and i set it to a date earlier than today so it never runs because the user needs to initiate this backup in the morning.

so I have them open scheduled tasks, right click it and run, but that will only over right, or make one GIANT file.

This is the current string in the scheduled task

C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\MorningBackup.bks" /a /d "Set created 6/7/2007 at 9:38 AM" /v:yes /r:no /rs:no /hc:off /m normal /j "MorningBackup" /l:s /f "E:\Backup.bkf"

Yes Id like to keep an archive of 14 days

Regards

Avatar of Lee W, MVPLee W, MVP🇺🇸

Give me a day and you might have it - I've had a batch file for running NTBackups posted on my web site for some time.  I'm hoping to modify it today (was working on it last night, but hit a problem I couldn't resolve then) and expect to have an updated version ready that will allow automated deletions based on a set number of weeks to preserve.

You can get the current version - WITHOUT the automated deletions - at http://www.lwcomputing.com/mysoftware.asp

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


great i will keep an eye on it. please post here when its ready.

Avatar of Lee W, MVPLee W, MVP🇺🇸

No promises - I'm trying to work out the shifting issue - basically, the script would ask you how many weeks you want to save, then on a given day, it would shift Current Week to Week 1, Week 1 to Week 2, Week 2 to Delete and delete the contents of Delete.  But I'm having issues automating this - when I can get them worked out (I have my own open question on this) it should work nicely.

could you just check the date on the folders and IF the date is greater than X days away from current date delete it? x being the number of days you want to keep?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Lee W, MVPLee W, MVP🇺🇸

Date checking and comparison is not easy in a batch file for these purposes - it can be done, but it's not easy.  However, I do have my solution and I will be working on the batch file later today.

ok let me know, otherwise I know a software guy who could whip up a small exe that you could call to do date checing.

Avatar of Lee W, MVPLee W, MVP🇺🇸

Ok - I think it's ready.  TEST IT FIRST.  I did some testing myself and I think it's ok, but TEST IT FIRST.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of ajbrittonajbritton🇬🇧

Take a look at BackupAssist (http://www.backupassist.com). It's a very friendly front end to NTBACKUP. It takes care of scheduling and various backup schemes. There is a 30 day free trial. I use it to backup small servers to NAS. It's really very good and not at all expensive.

leew, i tried v 1,07 and did not see any options for a backup scheme as far as how many days to keep etc.

Avatar of Lee W, MVPLee W, MVP🇺🇸

You need 1.1, not 1.07 - in addition, it does it by weeks, not days.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ok  will take a look at it again tonight.

ASKER CERTIFIED SOLUTION
Avatar of SuprSpy79SuprSpy79

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Storage

Storage

--

Questions

--

Followers

Top Experts

Computer data storage, often called storage or memory, is a technology consisting of computer components and recording media used to retain digital data. In addition to local storage devices like CD and DVD readers, hard drives and flash drives, solid state drives can hold enormous amounts of data in a very small device. Cloud services and other new forms of remote storage also add to the capacity of devices and their ability to access more data without building additional data storage into a device.