PST Backup Script

bigk

2[H]4U
Joined
Oct 16, 2007
Messages
3,003
I am no script guru by any means, but I've been thrown head first into this project and I can't figure out whats causing intermittent issues with our users.

Here is the synopsis of the setup;
- Run a logon script daily that points to a VB script on NETLOGON
- VShadow(also on NETLOGON) runs and moves users PSTs to a network drive
- 90% laptops

Now what should happen is users will see the logon and vb script running, but should be able to open up Outlook/other apps and work on things like normal while it runs in the background.

What is actually happening is some users can't use their machines at all for some time(ranges from 2-20 minutes), and I can't for the life of figure out why this is happening.

Any ideas?
 
Last edited:
Why not put their psts on the network to begin with and then point outlook to the network location instead of copy the psts daily. We use to put pst files in the users home drive (H:\Mail\UsersMail.pst) and point outlook to it.. Worked great until one would flop and we would have to rebuild it. We got sick of it and finally convinced to boss to purchase something better. Don't know the size of your business but we had maybe 30 users in total that we had to change. Moved a couple a day and all was well.
 
Are these laptops? remote users?

If they are normal desktops this is a very inefficient way of doing this, why not put the PST file on the network drive to begin with?
 
These are 90% laptops who take their machines home at night.
 
Wont outlook close immediately if it cannot find the PST (lets say they are on laptop, want to work offline mode)
 
It asks you for the location of the pst file if it can not find it.

Although, if it goes to a mapped drive, (Home drive for instance) then the drive will map long before outlook is opened if the resource is available
 
It asks you for the location of the pst file if it can not find it.

Although, if it goes to a mapped drive, (Home drive for instance) then the drive will map long before outlook is opened if the resource is available

You said you had a logon script for these users. The home drive should either be mapped through ad or mapped through the logon script. I personally use the logon script. Done right there.

net use H: \\servername\%username%$

Do the remote users have vpn access into your facility? Might include that logon script as part of the vpn connection. I think in the cisco vpn client there is an option to launch a program on connect
 
Having PSTs on mapped drive is out of the questions for many reasons, some of which are bandwidth issues, not all users have VPN connectivity, etc.
 
I use a batch script when backing up PCs for restaging or replacement with a simple xcopy line

xcopy /h /s /d /y /c "%systemdrive%\*.pst" "H:\PST_Backups"
 
I use a batch script when backing up PCs for restaging or replacement with a simple xcopy line

xcopy /h /s /d /y /c "%systemdrive%\*.pst" "H:\PST_Backups"

Yeah, but doing something like that in a login script is just insane, i would had to copy any data file over 1 MB to a PC in a login script. (unless your implementing document redirection, but that is only a one time hit.)

PST files can get BIG, maybe you should find a better way than backing them up with a login script. Perhaps a logoff script may serve you better?
 
Having PSTs on mapped drive is out of the questions for many reasons,.

As it should be. Horrible idea to map live PSTs across a network.


*Not supported by Microsoft
http://support.microsoft.com/kb/297019/en-us
*The way the PST works with NTFS, allocating more space...especially for inter office e-mail...ugh...the amount of sessions that it takes on the server really cripples other things the server should be doing. Say you have 100 users, and you send an interoffice e-mail to everyone..right away there's 100 sessions sucked out of the server, while free space is allocated...the queues on the server just back up.
*Outlook clients frequently never fully unload the PST when Outlook is closed, and this often holds up server resources, not to mention backup software freaks out about it.
*It's a chatty database file, clog that network!
 
Yeah, but doing something like that in a login script is just insane, i would had to copy any data file over 1 MB to a PC in a login script. (unless your implementing document redirection, but that is only a one time hit.)

PST files can get BIG, maybe you should find a better way than backing them up with a login script. Perhaps a logoff script may serve you better?

We thought of that, but people take their laptops home without logging off.
 
Are these laptops part of an AD network? If so have you tried to change this from a logon script to a startup script?

I assume your problem is when the logon script is executed it is done so before the user can see the desktop. By moving the script to start up the user will have full access to there desktop as the script is running.
 
How many users total?
I'm guessing Exchange unfortunately isn't in the mix?

About 160.
What do you mean?

Are these laptops part of an AD network? If so have you tried to change this from a logon script to a startup script?

I assume your problem is when the logon script is executed it is done so before the user can see the desktop. By moving the script to start up the user will have full access to there desktop as the script is running.

Interesting though, I'll look into it.
 
I wouldn't want to copy the thing every login either, I guess I was thinking this was on exchange, and just backing up the archives. In which case the xcopy script is good because it only copies if the file has changed.
 
Do you not have exchange? 160 users all on PST, i hope they are spread out in different offices, otherwise trying to copy 160 pst files at login will be painful,

I really don't se an easy way for you to do this, startup script will still slow the user down when the pst files gets large
 
Do you not have exchange? 160 users all on PST, i hope they are spread out in different offices, otherwise trying to copy 160 pst files at login will be painful,

I really don't se an easy way for you to do this, startup script will still slow the user down when the pst files gets large

Sorry, we do you have Exchange, just read your question wrong.

And they are spread out through out office, also logon times are somewhat different cause a lot of people don't come in at 9, but yeah it's still tough on the network.
 
If you're on exchange, then local PST files are just archives, they shouldn't need to be backed up every day.
 
If I am not mistaken, you will not be able to copy the PST if Outlook is open. What I would do is setup a standard location on all laptops where to store the PST. For example, store all the PST files on all laptops at C:\PST

Then create a script with a copy command that will copy that PST. Then all you need to do is point Outlook to that PST location.
 
If you're on exchange, then local PST files are just archives, they shouldn't need to be backed up every day.

Bingo, with exchange you should leave all but archived data on the server, depending on retention policy of course.

Example, a client of mine implemented a 99 year retention policy. So they don't allow you to delete ANYTHING from your mailstore, not even spam (if it gets past the filter)
 
Sorry, we do you have Exchange, just read your question wrong.

So why do you have an interest in PST files? Outlook 2003 or higher....your laptop users can run Outlook in cached mode, it's an OST which is just a copy of their Exchange mailbox. It works well through a VPN tunnel or light connection, does offline mode, and since it's a copy of their Exchange mailbox...no need to back it up, you can wipe it out locally on the laptop and next time Outlook launches...it simply rebuilds it.
 
Bingo, with exchange you should leave all but archived data on the server, depending on retention policy of course.

Example, a client of mine implemented a 99 year retention policy. So they don't allow you to delete ANYTHING from your mailstore, not even spam (if it gets past the filter)

Don't you run into storage size issues with such a high retention policy?
So why do you have an interest in PST files? Outlook 2003 or higher....your laptop users can run Outlook in cached mode, it's an OST which is just a copy of their Exchange mailbox. It works well through a VPN tunnel or light connection, does offline mode, and since it's a copy of their Exchange mailbox...no need to back it up, you can wipe it out locally on the laptop and next time Outlook launches...it simply rebuilds it.

We also have a 250MB size limit on users mailboxes, hence the need for .PSTs.
 
We also have a 250MB size limit on users mailboxes, hence the need for .PSTs.

Ugh! Wow.

Time to grab the beancounters by their throats and tell them they have to ditch that 20 gig hard drive on the Exchange server and upgrade some hardware.

The difficulty in managing it, plus the potential loss of data, is above the cost of overdue upgrades.
 
Don't you run into storage size issues with such a high retention policy?


After x amount of months, the data is transfered to a Archive server. the storage is being planned out accordingly, they have the cash to dump into expandable storage, so its not that big of a deal. I don't recall the data projections over the next few years off the top of my head
 
After x amount of months, the data is transfered to a Archive server. the storage is being planned out accordingly, they have the cash to dump into expandable storage, so its not that big of a deal. I don't recall the data projections over the next few years off the top of my head

Interesting, unfortunately we already looked at this(just asked around), and cost is too high to implement right now.

Back on topic though, just read up on Robocopy, and it looks like it deletes the orignal file that it copies over. Is there a way to circumvent that?
 
lool 256mb email store =/

comeone get with the times here, upgrade the limit, upgrade storage, and dont worry about backing up pst when the server holds it all.
 
My old company had a 90MB limit. Of course they had 10,000 mailboxes. It's all relative. At my current job people send 150MB email attachments, keep 200,000 emails in their inbox, and have 45GB mailboxes and wonder why their Outlook is horribly slow when we don't limit mailbox size. Obviously there's a middle ground that can be reached but just saying that 'lol 250MB get with the times' is pretty short-sighted. Things like user education come into play but ultimately our attorneys want their stuff to work and they don't care how, hence why we bought Enterprise Vault.

I know it may not be on topic, but I find it rather humorous that some people post 'getting with the times' when there are far more things to weigh than just throwing disk at the problem. Not a flame, just an observation so please do not take it as such.
 
Yea things get much much different when your talking 10s of thousands of users, 250mb each adds up fast and the overall size and complexity of the mailstore become a factor.
 
Yea things get much much different when your talking 10s of thousands of users, 250mb each adds up fast and the overall size and complexity of the mailstore become a factor.

Read up..he told us "About 190 users"...far cry from 10s of thousands.

The above 2 posts talk about things other than storage....OK, well...he wants to backup all the PST files.

Err...uhmmm....does that not require disk space? Eh? :confused:

A gig or 2 per mailbox, versus a gig or 2 per PST....what's the diff? Besides PSTs on a network not being supported by MS, and besides PSTs on a networ being one of the worse things you can do to your network and servers performance. Spacewise...he has to buy the same amount of disk space.

And Outlook isn't slow in cached mode no matter how large your folders are....especially after SP2 for Office 2K7...it snaps open at the blink of an eye.
 
Read up..he told us "About 190 users"...far cry from 10s of thousands.

The above 2 posts talk about things other than storage....OK, well...he wants to backup all the PST files.

Err...uhmmm....does that not require disk space? Eh? :confused:

A gig or 2 per mailbox, versus a gig or 2 per PST....what's the diff? Besides PSTs on a network not being supported by MS, and besides PSTs on a networ being one of the worse things you can do to your network and servers performance. Spacewise...he has to buy the same amount of disk space.

And Outlook isn't slow in cached mode no matter how large your folders are....especially after SP2 for Office 2K7...it snaps open at the blink of an eye.

Yeah that's my fault that I posted that. :p

As long as you cap your mailboxes(within a resonable limit), OST's are fine. Cap them at something higher than say 2GB and you're going to be hurting. I don't subscribe to the PST on the network thought process either. In fact when I found them I instructed the users to move them or risk deletion.

I'll concede to the space requirement. ;)
 
Thanks for all the comments, but unfortunately the powers that be will not budge on their sentiment, so I have to comply.

Any help with the scripting?
 
Keep the mail on the exchange server and use Outlook in "cached" mode.

Benefits:

1: Central Backup point (the exchange server)
2: Less bandwidth to synchronize the .OST than copying full PSTs
3: Users can use outlook normally when offline, then synch when they reconnect

Cons:

I dunno, I can't see any off the top of my head.
 
I am no script guru by any means, but I've been thrown head first into this project and I can't figure out whats causing intermittent issues with our users.

Here is the synopsis of the setup;
- Run a logon script daily that points to a VB script on NETLOGON
- VShadow(also on NETLOGON) runs and moves users PSTs to a network drive
- 90% laptops

Now what should happen is users will see the logon and vb script running, but should be able to open up Outlook/other apps and work on things like normal while it runs in the background.

What is actually happening is some users can't use their machines at all for some time(ranges from 2-20 minutes), and I can't for the life of figure out why this is happening.

Any ideas?

The problem you're having is the copy routine is running which is delaying the boot up.

Microsoft makes a program called pst backup or something like that.
http://www.microsoft.com/downloads/details.aspx?FamilyId=8B081F3A-B7D0-4B16-B8AF-5A6322F4FD01&displaylang=en
It runs when the user closes their outlook program. If you have to do it the way you're doing it I would suggest trying that program and have it backup to another location on the hard drive. If you try backing up on a network it's gonna slow things down. You can't copy an open pst file. You can schedule a copy command to run anytime during the day which copies the backup file to a network drive. In a catastrophic loss the worst is you'll miss one day backup unless they are traveling out of town. Since the boss wants it that way then that's what they have to deal with. Not an ideal situation by any means, but perhaps a disaster is needed for the chiefs to see the light.
 
Last edited:
If your email host doesn't support imap then you might look at US Internet or something for your mail host. It isn't that expensive and you can then use securence spam filtering which is very good.
 
Back
Top