Solved

How do I run Robocopy with Shadowcopy script

Posted on 2011-03-10
4
889 Views
Last Modified: 2012-05-11
I have multiple locations, connected with vpn. I am interested in backing up all my files from one location to the other location every night. I currently have backupexec on my main location and have tried backing up to the remote location. My problem was that backupexec failed when backing up using the above method. (that's both backups, local and remote.) Downside using backupexec, Being that I have the constraints of a vpn (speed), I don't want to backup files which were backed up already. Hence, differential, would just build up over time and kill me, till I have to do another full backup. My other option would be incremental, that means I would also have to do another full backup every now and then, plus I would have the headache of restoring all backups.

I have therefore thought robocopy would be a great tool. I have 3 problems with this. 1) Open files, 2) Logs. 3) I need the logs, failed or success to be emailed in simple language.

I have read that robocopy could be run in conjunction with shadow copy. Question, could I have only those files that failed be copied via shadow copy, or being that shadow copy is a new file, would that mean that all files will be copied again?
0
Comment
Question by:JoeyTheGreat
4 Comments
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 35106142
I don't know about robocopy with shadow copy, but I will tell you hat I do and maybe it will work for you too.

I use DFS-R available in Windows 2003 R2 and above to replicate the files from all of my remote servers to my central file server. I then just backup my central server. I have 11 servers replicating hundreds of GB over T1 connection. DFS-R is very bandwidth efficient, and it only copies over changed bytes, which is as efficient as it gets. This only works for file servers, but it works very well.
0
 
LVL 32

Expert Comment

by:nappy_d
ID: 35107935
For a simple backup/replication solution, robocopy is definitely that. Take a look at this post of mine. You xan certainlly use Robocopy in the scenario you mentioned.

If you add the switch /b, it runs in backup mode.

If you add the switch /log:lathToLog.log, it will create a log for you.

The issue now, is hat yo want a daily log that is unique. Unfortunately it will overwrite or append the same name. Not good.

DFS fnctionality is great but this my solve your issues  

My fix for this is to get a free app called namedate.exe. With namedate, you can now append the current date to your robolog file.

I set this all up in a batch script.
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/Q_25051025.html
0
 
LVL 30

Accepted Solution

by:
pgm554 earned 500 total points
ID: 35109544
You need to use an Rsync method for bakup.

Try this:

http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
0
 
LVL 13

Expert Comment

by:connectex
ID: 35114780
This guy post about using VSS like you mentioned: http://blogs.msdn.com/b/adioltean/archive/2005/01/20/357836.aspx. The VSS copy can be mounted as a drive letter or within an empty folder. It's uses vshadow.exe which is from my research is part of the VSS SDK.  As for robocopy it will only copy the files that have changed. Plus it has lots of options including the /IPG for fine tuning its performance over a WAN.

I'd recommend the following command if you want to mirror the content. Note, this will delete files that sre deleted on the source.

robocopy <source> <destination> *.* /mir /copyall /z /r:0 /w:0 /np /log:<log path>

I'd recommend the following command if you don't want to erase older files.

robocopy <source> <destination> *.* /e /copyall /z /r:0 /w:0 /np /log:<log path>
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now