Thursday, June 2, 2016

Back It Up Mister !!!

 I have a number of computers throughout my house (embarrassed to say how many) and all important files need to be copied to my main server which uploads it to the internet for archiving. This can be quite tedious doing this manually especially when you may have multiple copies of a file on different computers as well as the possibility that an existing copy may already be on the backup server or even on the archive server (internet). So I have been using xcopy which has been working fine but I have the use Task Manager to kick off the process (.bat file). Enter RoboCopy which has many of the same switches (parameters) that xcopy has but it can be scheduled, unlike xcopy which needs another process to kick it off. It also copies more file properties than xcopy. Also has logging options.
Usage:
robocopy <Source> <Destination> [<File>[ ...]] [<Options>]

<Source> Specifies the path to the source directory.
<Destination> Specifies the path to the destination directory.
<File> Specifies the file or files to be copied. You can use wildcard characters (* or ?)
<Options> Specifies options to be used with the robocopy command.

Some of the important switches (options):
/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/MOV :: MOVe files (delete from source after copying).
/MOVE :: MOVE files AND dirs (delete from source after copying).
/xo Excludes older files (to exclude files that are older than those they're being copied over)

Scheduling
/rh:hhmm-hhmm Specifies run times when new copies may be started.

Logging
/log:<LogFile> Writes the status output to the log file (overwrites the existing log file).
/log+:<LogFile> Writes the status output to the log file (appends the output to the existing log file).
/l Specifies that files are to be listed only (and not copied, deleted, or time stamped).

A complete list can be found at
https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx
or
http://burpee.smccme.edu/studenthowtos/robocopy.htm


No comments:

Post a Comment