• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2147
  • Last Modified:

Robocopy or DOS Backup Folder Name Variable?

I'm using Robocopy to backup a server with a daily changing folder name:

robocopy "\\Server1\Backups\Server1Images.20070804" "J:\Server1\Server1Images.20070804" /r:1 /w:2 /mir

The folder name changes everyday: Server1Images.20070804, Server1Images.20070805, Server1Images.20070806
0
kvnsdr
Asked:
kvnsdr
  • 2
1 Solution
 
Farhan KaziSystems EngineerCommented:
Try this using batch file.

@Echo Off
SET M=%DATE:~4,2%
SET D=%DATE:~7,2%
SET Y=%DATE:~10,4%
SET FName=%Y%%M%%D%
robocopy "\\Server1\Backups\Server1Images.%FName%" "J:\Server1\Server1Images.%FName%" /r:1 /w:2 /mir
0
 
kvnsdrAuthor Commented:
Is there a better way than timestamping the file to make my backups easier?
0
 
Farhan KaziSystems EngineerCommented:
I think time stamping is the standard/convenient way for making backups (using batch files).  However you can use Windows NTBackup.

For more info regarding NTBackup:
http://www.microsoft.com/technet/technetmag/issues/2005/05/NTBackup/
http://www.ntbackup.us/
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now