Solved

Robocopy Question

Posted on 2016-08-30
5
63 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 23

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 27

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now