?
Solved

Robocopy Problem

Posted on 2007-04-03
6
Medium Priority
?
766 Views
Last Modified: 2009-10-29
Hi All..Please put me right. i am trying to both schedule a robocopy operation and log the results. This is my syntax:-
robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:"C:\Log Files\Backup\packagecopy.log"

What happens is the dos shell flashes on then off the screen with no copy..What have I got wrong here ???
0
Comment
Question by:mrmad1966
[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
  • 3
  • 2
6 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18843821
What's in your log file?
Try it from a command prompt...or use this:

Start->Run->Cmd /k robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:"C:\Log Files\Backup\packagecopy.log"
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 18843932
If you are scheduling this as a task using the default system account, it will not have the rights to access network resources and will fail. You should change the task to run as a domain user will sufficient rights to the network resources.

Good Luck,
Steve
0
 
LVL 1

Author Comment

by:mrmad1966
ID: 18844630
What's in your log file?
Nothing...It does not get to the point of being created.. Am I correct in assuming this log file SHOULD be a record of the copy operation ?

Steve, the permissions are fine. If I run the same same command but miss of the /LOG option it runs sweet !

Mr Bounty ! what is the /k switch for ???
Thank /you
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 67

Accepted Solution

by:
sirbounty earned 252 total points
ID: 18844725
the /k simply states to leave the command window open after processing.
I thought that since it's disappearing that this could present the trouble to you...

If you run it fine from a command prompt without the log switch, then I'd suggest using the short name and leave out the quotes:

robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log
0
 
LVL 30

Assisted Solution

by:SteveGTR
SteveGTR earned 248 total points
ID: 18845092
You might also redirect the standard error to help debug the problem.

robocopy \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log 2>c:\debug.txt
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 18845110
Another thing you might want to do is fully qualify the path where robocopy is located. The scheduled task may not have the path set to automatically locate robocopy. For example:

"c:\program files\program\robocopy" \\FirstServerName\training\packages\test \\SecondServerName\training\packages\test
/E /RH:2100-2200 /LOG:C:\LogFil~1\Backup\packagecopy.log
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 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