Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use Robocopy to Copy Files from a network Location

Posted on 2011-02-20
8
Medium Priority
?
6,274 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
ID: 34937080
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
ID: 34937082
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
ID: 34937100
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
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!

 
LVL 8

Expert Comment

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

Open in new window

0
 
LVL 6

Expert Comment

by:Bxoz
ID: 34937216
Oops my mistake sorry
0
 
LVL 6

Expert Comment

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

Expert Comment

by:Toxacon
ID: 34937227
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 2000 total points
ID: 34941968
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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Learn about cloud computing and its benefits for small business owners.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

916 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