Link to home
Start Free TrialLog in
Avatar of brandsco
brandscoFlag for United Arab Emirates

asked on

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

\\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
Avatar of Toxacon
Toxacon
Flag of Finland image

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.
Avatar of Bxoz
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)
Avatar of brandsco

ASKER

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>
robocopy \\192.168.0.100\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.
ASKER CERTIFIED SOLUTION
Avatar of danny1875
danny1875
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial