Backup configuration questions

  • Thread starter Thread starter Dan Chaffee
  • Start date Start date
D

Dan Chaffee

I need some assistance in configuring the Win 2K backup utility for
the following scenario.

I wish to perform a daily, incremental backup of four different
directories on hard drive of one server to the hard drive of a
different server. The trick is in configuring the directory structure
on the hard drive of the backup server. I wish to have the backup
utility create a new directory structure for the backup based on the
system date. So, for example, when the backup runs for 4/22/2004, it
would create a directory called 2004 (for the year), and under that a
directory called 4 (for April), and under that a directory called 22
(for the date), and then finally backup the selected four directories
under the "22" directory. Then, for each remaining date in April, the
backup utility would create a new directory for the date. Then, once
May arrives, the backup utility would create a new directory for the
month of May (a directory 5), and so on for the rest of the year.

Any suggestions as to how I can configure this?

Thanks.

Dan
 
Dan Chaffee said:
I need some assistance in configuring the Win 2K backup utility for
the following scenario.

I wish to perform a daily, incremental backup of four different
directories on hard drive of one server to the hard drive of a
different server. The trick is in configuring the directory structure
on the hard drive of the backup server. I wish to have the backup
utility create a new directory structure for the backup based on the
system date. So, for example, when the backup runs for 4/22/2004, it
would create a directory called 2004 (for the year), and under that a
directory called 4 (for April), and under that a directory called 22
(for the date), and then finally backup the selected four directories
under the "22" directory. Then, for each remaining date in April, the
backup utility would create a new directory for the date. Then, once
May arrives, the backup utility would create a new directory for the
month of May (a directory 5), and so on for the rest of the year.

Any suggestions as to how I can configure this?

Thanks.

Dan

Here is a starting point:

@echo off
for /F "tokens=2-4 delims=/ " %%a in ('echo %date%')
do set day=%a & set month=%b & set year=%c
(unwrap line)

You can now use the variables %day%, %month%, %year%
to create the desired directory structure.

Note that the "set" statements above works well for my date
zone. The command

echo %date%

returns 22/04/2004 for me. You must adjust it so that it
suits your own date zone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top