SuprSpy79
asked on
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
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
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?
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\ntback up.exe backup "@C:\Documents and Settings\Administrator\Loc al Settings\Application Data\Microsoft\Windows NT\NTBackup\data\MorningBa ckup.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
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\ntback
Yes Id like to keep an archive of 14 days
Regards
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
You can get the current version - WITHOUT the automated deletions - at http://www.lwcomputing.com/mysoftware.asp
ASKER
great i will keep an eye on it. please post here when its ready.
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.
ASKER
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?
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.
ASKER
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.
Ok - I think it's ready. TEST IT FIRST. I did some testing myself and I think it's ok, but TEST IT FIRST.
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.
ASKER
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.
You need 1.1, not 1.07 - in addition, it does it by weeks, not days.
ASKER
ok will take a look at it again tonight.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.