Link to home
Start Free TrialLog in
Avatar of Nael_Shahid
Nael_Shahid

asked on

Robocopy.exe

Hi,

I am looking to replicate a shared directory on an WinXP internal volume to a external USB/Firewire drive twice daily as a removable backup solution.

I have been looking into using Robocopy.

Has anyone used this utility and if so can you give a starting syntax to work with in the following scenario:

- Copy a shared directory called "Data" from the F:\ drive to an external drive with the drive letter of G:\ drive
- Copy all subdirectories and files
- Copy all security
- Copy once at 12pm and once at 4:30pm Monday to Friday

I have the manual but need to get started asap so would like a starting point from someone who has used the tool.  
 
ASKER CERTIFIED SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, missed one info. My comand would copy ENTIRE F:\ but you wanted just to copy F:\Data! Better use:

robocopy F:\Data G:\Data /E /COPYALL /W:1 /R:3  /LOG+:%TEMP%\Backup.log
and note that files that are opened with write access while robocopy runs (i.e. open Word docs) will not be copied!
Avatar of Nael_Shahid
Nael_Shahid

ASKER

Thanks for that.

Is there no way of copying open files?

Also, what is the switch to remove files and directories from the destination that have been removed from the source?
For backup of open files add to the command line parameters

/ZB

/ZB use restartable mode; if access denied use Backup mode.

I've never played with it....


To completely sync the Backup use

/PURGE

/PURGE delete dest files/dirs that no longer exist in source.

But I'd rather keep deleted files in my backup. If someone accidentially deletes a file and doesn't realize this before your backup script runs you can recover the file immediately from the backup drive.