How to use Robocopy to Copy Files from a network Location

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

\\\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
Who is Participating?
danny1875Connect With a Mentor Commented:
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

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.
In a batch file
 Robocopy \\\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)
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

brandscoAuthor Commented:
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 \\\D$\Outlook.pst  F:\Sales Manager /MIR /Z

   ROBOCOPY     ::     Robust File Copy for Windows


  Started : Sun Feb 20 16:59:24 2011

   Source : \\\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.
The directory name is invalid.

robocopy \\\d$ "F:\Sales Manager" Outlook.pst /Z

Open in new window

Oops my mistake sorry
The command was for the all directory not the file .pst
Don't use the Mirror option because it will delete contents of the backup folder if you backup multiple computers to the same place.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.