Solved

SCRIPT FOR BACKING UP

Posted on 2008-10-18
3
207 Views
Last Modified: 2013-12-01
Need help to: write a script that copies, and renames them to username_date_outlookarchive.pst and then copies them to a shared folder on the server so backup exec can grab them; configure to run  a script to delete the archives after backupexec is complete.
0
Comment
Question by:gabepcsolutions
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
AmazingTech earned 500 total points
ID: 22753130
Who's going to run the script to copy the archives? Each user or an administrator?

On a user logoff script or user logon script you can run this batch file.
COPY "%UserProfile%\Application Data\Microsoft\Outlook\Outlook.pst" "\\Server\Share\Backup\%UserName%_%Date:/=.%_OutlookArchive.pst"

Open in new window

0
 

Author Comment

by:gabepcsolutions
ID: 22753175
Thanks.
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22753186
VBS.

The deleting part you'll have to get a script to run after backupexec.

DOS batch:
Del /q "\\server\share\backup\*.pst
ServerFolder="\\Server\Share\Backup"
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
 
File=WshShell.SpecialFolders("AppData") & "\Microsoft\Outlook\Outlook.Dat"
BackupFile=ServerFolder & "\" & WshShell.ExpandEnvironmentStrings("%UserName%") & "_" & Replace(Date,"/", ".") & "_OutlookArchive.PST"
 
wscript.echo "Source: " & File
wscript.echo "Target: " & BackupFile 
 
objFSO.CopyFile File, BackupFile
 
Set objFSO = Nothing
Set WshShell = Nothing

Open in new window

0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

735 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