Windows 2003: Dynamic Filename for Backup Name

Hi,

I am looking to schedule a regular backup in Win 2003 using the
default backup utility.
I would like the name of the backup file to be dynamic, with a date
and time stamp.
Date is more important than time; If I can get a filename with the
date, but without a
timestamp, that is fine.

For example, today's backup should be Feb_11_2010_6PM_File_Backup,
though Feb_11_2010_File_backup will do.

Next week's today be Feb_11_2010_5_59PM_File_Backup, etc..

The specific date and timestamp format is not important to me.

I am hoping that I can specify a filename such as
<datestamp>_<timestamp>_File_Backup,
and that the Windows scheduler will be able to create a filename with
the timestamps.
Is that possible?



Thanks,
QZ

Can this be done?
0
basis_consultant
2/11/2010 6:57:35 PM
windows.server.general 1084 articles. 0 followers. Follow

2 Replies
1144 Views

Similar Articles

[PageSpeed] 51


<basis_consultant@hotmail.com> said this in news item 
news:ac94088b-7be0-4616-b782-ec0aaccccf87@h2g2000yqj.googlegroups.com...
> Hi,
>
> I am looking to schedule a regular backup in Win 2003 using the
> default backup utility.
> I would like the name of the backup file to be dynamic, with a date
> and time stamp.
> Date is more important than time; If I can get a filename with the
> date, but without a
> timestamp, that is fine.
>
> For example, today's backup should be Feb_11_2010_6PM_File_Backup,
> though Feb_11_2010_File_backup will do.
>
> Next week's today be Feb_11_2010_5_59PM_File_Backup, etc..
>
> The specific date and timestamp format is not important to me.
>
> I am hoping that I can specify a filename such as
> <datestamp>_<timestamp>_File_Backup,
> and that the Windows scheduler will be able to create a filename with
> the timestamps.
> Is that possible?
>
> Thanks,
> QZ
>
> Can this be done?

It can certainly be done but I suppose you really want to know HOW it can be 
done. Here is a method:

1. Use the ntbackup GUI interface to create a backup job. Make sure to
specify that it should not run now but later.
2. Open the Task Scheduler, then open the backup job that you just created.
3. Mark & copy the whole command line.
4. Create the new batch file c:\Windows\MyBackup.bat
5. Paste the backup command line into it.
6. Create some blank lines at the top of the file, then paste the following
code into the empty space. Use copy & paste - do not retype it!
  @echo off
  set MyDate=%date:/=_%_%time::=_%
  ntbackup /.. /.. /.. /F d:\Backups\%MyDate%_File_Backup.bkf
7. Adjust the last line of the above code so that it matches your own
switches, then remove the original ntbackup command line.
8. Use the Task Scheduler to create a task that will invoke
c:\Windows\MyBackup.bat instead of your previous ntbackup command 

0
Pegasus
2/11/2010 9:29:42 PM
On Feb 11, 4:29=A0pm, "Pegasus [MVP]" <n...@microsoft.com> wrote:
> <basis_consult...@hotmail.com> said this in news itemnews:ac94088b-7be0-4=
616-b782-ec0aaccccf87@h2g2000yqj.googlegroups.com...
>
>
>
>
>
> > Hi,
>
> > I am looking to schedule a regular backup in Win 2003 using the
> > default backup utility.
> > I would like the name of the backup file to be dynamic, with a date
> > and time stamp.
> > Date is more important than time; If I can get a filename with the
> > date, but without a
> > timestamp, that is fine.
>
> > For example, today's backup should be Feb_11_2010_6PM_File_Backup,
> > though Feb_11_2010_File_backup will do.
>
> > Next week's today be Feb_11_2010_5_59PM_File_Backup, etc..
>
> > The specific date and timestamp format is not important to me.
>
> > I am hoping that I can specify a filename such as
> > <datestamp>_<timestamp>_File_Backup,
> > and that the Windows scheduler will be able to create a filename with
> > the timestamps.
> > Is that possible?
>
> > Thanks,
> > QZ
>
> > Can this be done?
>
> It can certainly be done but I suppose you really want to know HOW it can=
 be
> done. Here is a method:
>
> 1. Use the ntbackup GUI interface to create a backup job. Make sure to
> specify that it should not run now but later.
> 2. Open the Task Scheduler, then open the backup job that you just create=
d.
> 3. Mark & copy the whole command line.
> 4. Create the new batch file c:\Windows\MyBackup.bat
> 5. Paste the backup command line into it.
> 6. Create some blank lines at the top of the file, then paste the followi=
ng
> code into the empty space. Use copy & paste - do not retype it!
> =A0 @echo off
> =A0 set MyDate=3D%date:/=3D_%_%time::=3D_%
> =A0 ntbackup /.. /.. /.. /F d:\Backups\%MyDate%_File_Backup.bkf
> 7. Adjust the last line of the above code so that it matches your own
> switches, then remove the original ntbackup command line.
> 8. Use the Task Scheduler to create a task that will invoke
> c:\Windows\MyBackup.bat instead of your previous ntbackup command- Hide q=
uoted text -
>
> - Show quoted text -

Hi,

Thanks for the information. I will likely try this.
0
basis_consultant
2/11/2010 10:27:30 PM
Reply:

Similar Artilces: