Solved

Robocopy Question

Posted on 2016-08-30
5
94 Views
Last Modified: 2016-09-06
I want to copy all shares from one server to a folder on another.

My syntax is: robocopy \\Library2 \\WSCALFS\Company\Library\ /MIR /W:20 /R:15

and this is the output:

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : Tue Aug 30 12:19:47 2016

2016/08/30 12:19:47 ERROR 161 (0x000000A1) Getting File System Type of Source \\Library
\
The specified path is invalid.

   Source - \\Library2\
     Dest : \\WSCALFS\Company\Library\

    Files : *.*

  Options : *.* /S /E /COPY:DAT /PURGE /MIR /R:15 /W:20

------------------------------------------------------------------------------

2016/08/30 12:19:48 ERROR 161 (0x000000A1) Accessing Source Directory \\Library2\
The specified path is invalid.
0
Comment
Question by:aclaus225
5 Comments
 
LVL 24

Accepted Solution

by:
NVIT earned 250 total points
ID: 41777058
Assuming \\Library2 is the server name, you need to specify the share name, e.g. \\Library2\share
0
 
LVL 29

Expert Comment

by:ScottCha
ID: 41777060
Here is a script I use for just that thing...This is nice because you are sent an email when the process starts and when it ends.  You can use Task Manager to start the migration at a specified time and be notified when it starts.

BTW...this is a PowerShell script.

##############################################################################
# Migrate files between servers .v 2.0.1
#
# !!!!! /B switch must be at the end of the command string or it will not work.  Files not owned will timeout and fail to copy !!!!!
#
# Use /COPYALL option to migrate ACL and Auditing Info (for production shares, servers must be in same domain)
# Use /COPY:DATO option to migrate Data, Attributes, Timestamp, Owner (Not Security, aUditing Info) (for backup copy of full system)
#
##############################################################################
$From = "user@company.com"
$To = "user@company.com"
$Cc = "user@company.com"
$Subject = "C Drive copy has started"
$Body = "C Drive copy has started"
$SMTPServer = "smtp.appriver.com"
$SMTPPort = "2525"
# $Attachment = "C:\temp\Some random file.txt"
#
Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `
-Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `
-Credential $cred # -Attachments $Attachment
##############################################################################

date

$source=@("\\dc1\c$")
$destination=@("e:\robocopy\dc1\c")
$logfile="e:\robocopy\robocopy_dc1_C.log"

robocopy $source $destination /COPY:DATO /E /Z /R:2 /W:3 /NP /XJ /PF /LOG+:$logfile /XF .rnd AUTOEXEC.BAT boot.ini bootmgr BOOTNXT CONFIG.SYS IO.SYS MSDOS.SYS NTDETECT.COM ntldr pagefile.sys /XD "$source\boot" "$source\CIntApps" "$source\Config.Msi" "$source\Dump" "$source\$Recycle.bin" "$source\Documents and Settings" "$source\RECYCLER" /B

attrib +r $logfile
attrib -s -h -r $destination
 
##############################################################################
# $Attachment = "C:\temp\Some random file.txt"
$Subject = "C Drive copy has completed"
$Body = "C Drive copy has completed"
#
Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `
-Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `
-Credential $cred # -Attachments $Attachment
##############################################################################
0
 
LVL 16

Assisted Solution

by:FOX
FOX earned 125 total points
ID: 41777068
It doesn't like \\library2, secondly are you copying everything inside library 2 to that destination?  If so you want to use the below.  Your getting security settings, and preserving timestamps

\\library2\  \\WSCALFS\Company\Library\  *.* /S /E /COPYALL /DCOPY:T  /MIR /R:15 /W:20 /LOG+:c:\temp\copylog.txt /TEE

If it doesn't like library2, use the IP of library2 and the ip of wscalfs

example
\\ipaddressoflibrary2\ \\ipaddressofwscalfs\Company\Library\ *.* /S /E /COPYALL /DCOPY:T  /MIR /R:15 /W:20 /LOG+:c:\temp\copylog.txt /TEE

ref link:  https://techjourney.net/robocopy-syntax-command-line-switches-and-examples/
0
 

Author Comment

by:aclaus225
ID: 41777081
Correct, I am trying to copy all of the shares from Library2 to a folder on WSCALFS.
0
 
LVL 28

Assisted Solution

by:serialband
serialband earned 125 total points
ID: 41777396
Is Library2 the share name or the server name?  What are your servers?  What are your shares?

The syntax is as follows:
robocopy.exe \\Server1\SharedFolder1 \\Server2\SharedFolder2   /MIR /W:20 /R:15
You're either leaving off the share name or the server name for your source.

If the Library2 folder is on a local disk, you still have to specify the local disk name along with the full path to Library2.
robocopy.exe D:\Library2 \\Server2\SharedFolder2   /MIR /W:20 /R:15
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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