Solved

How to use Robocopy to Copy Files from a network Location

Posted on 2011-02-20
8
4,212 Views
Last Modified: 2012-05-11
Hi All

I have some problems.. I have an external drive 1TB.

Now, i have several network locations which have PST Files on which outlook is running. We need to take backups of the outlook POP3 Users(just in case)..

I want to use powershell robocopy to copy all the PST and put in a folder. For example

\\192.168.0.100\D$\Outlook.pst      (This is the network PC)

F:\Sales Manager\                          (This is the Backup Drive Location)

I want this to be done. Please help me guys.
Thank You
0
Comment
Question by:brandsco
8 Comments
 
LVL 8

Expert Comment

by:Toxacon
Comment Utility
First of all, there will be problems copying a PST file which is in use. You must copy it while Outlook is not running. Secondly, you are connecting to administrative share, which requires administrative permissions.

1. Make a script that backs up the pst file to some location in local drive ("C:\Backups" for example) when Outlook is not running.
2. Create a BackupAgent user to domain
3. Create a hidden share to workstations (like "Backup$" sharing folder C:\Backups)
4. Allow only the BackupAgent user to connect to the Backup$ share.
5. Connect to that folder with the BackupAgent user instead of ordinary admin.
6. Copy data from the Backup$ share.
0
 
LVL 6

Expert Comment

by:Bxoz
Comment Utility
In a batch file
 Robocopy \\192.168.0.100\D$\Outlook.pst  F:\Sales Manager /MIR /Z

Open in new window


/MIR : MIRror a directory tree
/Z : Copy files in restartable mode (survive network glitch)
0
 
LVL 1

Author Comment

by:brandsco
Comment Utility
Ok. I am copying the .pst files when outlook is not running. I am having Domain admins and Enterprise Admins rights. But the command that Bxoz gave results in this manner. Please see the report below

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\siraj.BRANDSCO> Robocopy \\192.168.0.100\D$\Outlook.pst  F:\Sales Manager /MIR /Z

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

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

  Started : Sun Feb 20 16:59:24 2011

   Source : \\192.168.0.100\D$\Outlook.pst\
     Dest : F:\Sales Manager\

    Files : *.*

  Options : *.* /S /E /COPY:DAT /PURGE /MIR /Z /R:1000000 /W:30

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

2011/02/20 16:59:24 ERROR 267 (0x0000010B) Accessing Source Directory \\192.168.
0.100\D$\Outlook.pst\
The directory name is invalid.

C:\Users\siraj.BRANDSCO>
0
 
LVL 8

Expert Comment

by:Toxacon
Comment Utility
robocopy \\192.168.0.100\d$ "F:\Sales Manager" Outlook.pst /Z

Open in new window

0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 6

Expert Comment

by:Bxoz
Comment Utility
Oops my mistake sorry
0
 
LVL 6

Expert Comment

by:Bxoz
Comment Utility
The command was for the all directory not the file .pst
0
 
LVL 8

Expert Comment

by:Toxacon
Comment Utility
Don't use the Mirror option because it will delete contents of the backup folder if you backup multiple computers to the same place.
0
 
LVL 2

Accepted Solution

by:
danny1875 earned 500 total points
Comment Utility
This is the way i would do it if its any help..

Create a folder for the .pst to sit in, something like 'PST'

Map a network drive to that folder, say X:
Create a 'PST' folder in SalesManager folder

robocopy X:\ C:\SalesManager\PST /E /COPYALL /MIR /ZB /R:2 /W:30 /TEE

just make sure your run it from a command prompt with the correct priviledges.

hope that helps



0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

763 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

9 Experts available now in Live!

Get 1:1 Help Now