[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Robocopy Question

Posted on 2016-08-30
5
Medium Priority
?
163 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 25

Accepted Solution

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

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 500 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
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 join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

649 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