Solved

Robocopy Question

Posted on 2016-08-30
5
135 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 31

Expert Comment

by:Scott C
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 30

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

691 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