By aalborg-industries ·
Hi All,

This is my first post, I also feel that it is worth while mentioning I have very limited scripting abilities.

When I do any type of backup that is scheduled with NTBACKUP I have a choice of either appending or overwriting the job, is it possible to have a script that will (be started by task scheduler) use the command line syntax but (and this is the question) automatically add to the filename.bks the date or some other unique variable so that when the backup job is run every day it will not overwrite any of the previous jobs.

So the backup name could pottentially look like filename_date.bks

I hope this is clear.


Troy Thomas
IT & Network Administrator

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Collapse -

sample script

by DDTLeStar In reply to NTBACKUP script

User Administrator login:

Save your selection file as {C:\BackupTasks\Daily.bks}

Suppose you are using Data format 'dd/mm/yyyy'...

Create a batch file {C:\BackupTasks\Daily.bat} as follows (two lines):
set DateString=%Date:~6,4%.%Date:~3,2%.%Date:~0,2%

%WinDir%\system32\ntbackup.exe backup "@C:\BackupTasks\Daily.bks" /n "Backup_%DateString%" /d "Backup_%DateString%" /v:no /r:yes /rs:no /hc:off /m normal /j "Backup_%DateString%" /l:s /f "C:\Backups\Backup_%DateString%.bkf"

Schedule the batch file to be run by task scheduler. Backups will be saved in C:\Backups\ with filenames like that is sortable by filename.

Collapse -


by neal2206 In reply to NTBACKUP script
Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums