Windows Home Server isn’t backing up your temp directories

by Alex Kuretz on May 6, 2009 · 20 comments

in Windows Home Server

Update: This issue has been resolved by the release of Power Pack 3 for Windows Home Server.

The Windows Home Server Backup Software is an excellent solution for backing up all the PCs in the home. It does incremental backups every night, stores a single copy of the files that exist on more than one PC, allows the user to restore individual files from any saved backup, and can even do a full “bare metal” restore in the event that the operating system on your PC gets corrupted or the hard drive fails.

By default, when you install the Windows Home Server Connector software on your PC it configures what will be backed up and what is excluded. Obviously unneeded items such as the Windows pagefile and hibernation files, temporary internet files, and the recycle bin are excluded. Also automatically excluded from being backed up is the vaguely named “User temporary files”.

Files excluded from backup

Files excluded from backup

You’d be correct if you guessed that the default user and system temporary directories (%TEMP%, %TMP%, etc) were part of the mysterious “User temporary files”, but what you probably wouldn’t guess is that the Windows Home Server Backup Software automatically excludes any directory named “temp”. I’ll let that sink in for a minute.

Anything stored in a directory named “temp” is not backed up to your Windows Home Server, and there’s no way within Windows Home Server to work around this. You can’t even manually remove those directories from exclusion or explicitly include directories during backup configuration.

Configuration of the backup exclusions

Configuration of the backup exclusions

Most importantly, I’ve not been able to find any mention of this behavior in the Backup GUI, help links, or online help documents, so there is no way a user could expect this behavior to occur until they try to go recover their data and are left wondering why it is missing.

As a test, I went to the extreme and created a new user on my primary desktop PC and named it “temp”. As expected, Windows Home Server failed to backup the entire contents of my “temp” user’s home directory. When I went to restore the backup, I had no Pictures, no Music, no My Documents. Below is a screenshot that shows my PC’s Users directory on the right, and the same directory being restored from a default Windows Home Server backup of my PC.

Windows user directories versus WHS backed up user directories

Windows user directories versus WHS backed up user directories

I first became aware of this behavior just a few short weeks ago when forum member “tadowguy” posted about his experience, and subsequently several other members posted their data loss stories. The fact that any Home Server customer is losing data simply by using their Home Server as it was intended out of the box seems to be a significant design flaw. Here are some excerpts of the stories shared by our forum members, please view the above linked forum post for the complete details.

I loaded a backup for browsing and saw that it was missing 30GB of music files! I confirmed that they were still on the desktop PC in our office, but not being backed-up. So then I went to do a configure backup and saw that in the Excluded directories list I saw “User Temp files – 31 GB” was being excluded. Due to a quirk of naming, the music was in C:\mp3\temp, presumably I was going to move it somewhere else when I put it there 3 years ago. Anyway, it appears that the WHS backup code sees the word “Temp” and skips the backup even if it’s not a standard TEMP file location like C:\temp or C:\Windows\Temp.
– tadowguy

I wish I had read this last week. On my laptop I had a Temp folder where I put all my photos before I reviewed them and sorted them into other folders and did not realize it was not getting backed up. Laptop drive died so I got a new one and then after I did the restore these files were missing. Probably around 150 photos.
– kjpublic01

When I saw Tadowguy’s post I immediately renamed a couple of my “working” folders.
–JohnBick

I just realized/encountered another possible side-effect of this behaviour. Some programs (e.g. NIS) seem to store downloaded files to be run at the next boot in temp folders. If you restore from an image that is expecting an .msi file in a temp location to be present at boot, you’re bombarded with error messages until you manually resolve the problem yourself.

Not being able to disable temp directory skipping is the difference between a completely painless recovery and one that I have to spend my time at tinkering around to get back to normal.
– chrispy35

What could be the possible benefit for Windows Home Server to exclude non-system defined temporary directories? I would argue that most home servers have sufficient storage that there would be little affect on the server to store a few extra gigabytes of user created temp directories. Most arguments that I’ve heard boil down to the assertion that the Backup Software knows how to manage user data better than the user does, which frankly I find preposterous.

The unfortunate reality is that Windows Home Server is throwing away user created data without informing the user that this is occurring, while it should instead be erring on the side of protecting and preserving the users data.

I’m posting this article to hopefully inform more Windows Home Server users about this behavior so that they don’t also lose data. If you want to share your feelings on this behavior I suggest you log a Connect Feedback report with Microsoft. There are several that already exist around this topic, and while some have been closed as “By Design” there are others that are open to which you can apply a Rating or Validation so that Microsoft can hear your voice on this topic.

Feedback ID: 440133 – Active (Duplicate)
Feedback ID: 424876 – Active (Duplicate)
Feedback ID: 356062 – Active
Feedback ID: 272433 – Closed (Won’t Fix)
Feedback ID: 262216 – Closed (By Design)

Update: This issue has been resolved by the release of Power Pack 3 for Windows Home Server.




Article by

I'm Alex Kuretz, and I'm the founder of MediaSmartServer.net. I was the Lead Test and Integration Engineer at HP for the MediaSmart Server until April 2008 when I moved on to other opportunities outside HP. I've kept active in the Windows Home Server community, creating several add-ins and helping users make the most of their Home Servers.


{ 19 comments }

Poddie May 7, 2009 at 6:55 pm

I saw that thread and it scares the crap out of me that this is the case.

I have a habit of naming directories “temp” if I plan to move/rename them later, and who knows how many I have out there that I’ve never gotten back to.

This is the most ridiculous design decision I can imagine.

Shawn May 10, 2009 at 10:59 pm

This is a pretty serious issue. I sure hope MS gets this fixed quick. *renames temp folders*

SeaRay33 (George) May 17, 2009 at 3:35 am

I thint this is an issue that should be address in WHS v2. I marked the Connect Feedback reports that were still active or duplicates with five stars to boost its priority for the WHS team (I hope).

Marc Brooks May 18, 2009 at 3:27 pm

Personally, I think this is a very good decision for the average user. It needs to be documented better, though. I’m all for social engineering… make people clean up things and send the message that TEMP is for things that could go away anytime.

Jason June 1, 2009 at 10:28 am

Hey Alex,

Thanks for this bit of information.

So to clarify things:

-Any “Temp” folder is excluded in the WHS client backup, even if I created the Temp folder?

-Lastly, and more important, are you saying my client backups do not include My Documents and Music?

-Are you saying that if I restore a client after a sys failure, the My Docs and music will not be there?

Thank you in advance for your response.

Jason

Alex Kuretz June 1, 2009 at 10:45 am

Hi Jason,

1. Any directory named “Temp” is excluded from backup.
2. “My Documents” and “Music” directories are indeed backed up by WHS, except in the scenario I described in the blog post where I created a user named “temp”. See point one. :)

I hope this helps,
Alex

tadowguy June 1, 2009 at 10:42 pm

The WHS code should just exclude the environment variable TEMP places, or maybe just the standard places like C:\temp and C:\windows\temp.

Alex Kuretz June 2, 2009 at 9:44 am

I agree with you, tadowguy.

Jason June 2, 2009 at 6:01 pm

Hey ya’ll,

Alex…thanks for your clarification; that’s much appreciated and I have a little sense of relief that it’ll work. That being said, I’m into redundancy, so I end up Ghosting my clients, anyhow.

Is there a ‘server Ghost’ available?

I agree about the ‘temp’ file naming convention…it should be backed up. I’ll have to do a search to see if I have done that…and will rename before I get caught losing some data.

Thanks again, gentlemen.

Jason

Andy Ward June 29, 2009 at 5:47 pm

Ive just restored from a backup and my IIS on Vista wouldn’t server any pages – the C:\inetpub\temp directory wasnt backed up and the appPools dir was missing – crashing IIS!!

I also for some reason cant access the System.data.sqlclient classes any more in Visual Studio 2008 – I can’t open databases I have created!!

Also, SQL Management Studio fails to open my sqlserver express 2008 database.

All together a nightmare!!!!

And all of this happened because I tried to install PHP 5.2.10 as isapi which crashed my IIS even when PHP was uninstalled! I tried a system restore but because I resized my partitions a long time ago there were no backups – the old drives had check-marks so the OS thought it was getting backed up but since they were old they didn’t backup :(

Another wasted 16 hours….

:(

Alex Kuretz June 30, 2009 at 10:40 am

Hi Andy,

Thanks for sharing your experience, this highlights a pretty significant failure for small business/software developer types using WHS for backups of their critical workstations. If IIS doesn’t work after a Bare Metal Restore, this could be a serious issue.

Alex

Alex Kuretz June 30, 2009 at 10:55 am
Andy Ward June 30, 2009 at 1:34 pm

Hi Alex, yeah I tried a restore from WHS and then proceeded to try and fix it with stuff like the appPool etc BUT there were far to may issues to try and fix plus the time spent trawling through the web looking for fixes…

Basically I have resorted to an Acronis restore from Feb 2009 (wasn’t using Acronis regularly as I believed I was covered by WHS) and have almost got it all back working again – my attempts from WHS and Acronis have taken almost 2 days!!

So, happy bunny again now, and I WILL BE TAKING REGULAR ACRONIS BACKUPS from now on ;)

Also well and truly annoyed that Vista didn’t warn me that my system restore wasn’t working – it had check marks next to missing drives – but still didn’t say it wasn’t taking snapshots etc! All fixed now too so hopefully no more wasted hours!

Thanks for your suggestions,
Andy

Alex Kuretz June 30, 2009 at 2:16 pm

Hi Andy,

I see there is an bug about this issue open in the Microsoft Connect site, so the team is aware of the issue. However I do not know of any plans to correct the problem, and as you can see it’s one that I’ve been concerned about for awhile.

Thanks for following up with your resolution, and glad you’re up and running again.
Alex

Doug Strahm August 19, 2009 at 2:42 pm

Alex,
Oh how I wished I knew this several weeks ago!

Hard drive started failing on a lptop so I quickly swapped for a new drive, slapped in the recovery disk, and started up the restore process. I was very pleased to get the Windows logo back onto the screen and thought I was home free – not so fast though.

Immediately applications started initiating the install procedures whenever they tried to start up. Outlook, Office, Norton, Quicken, etc. And some embedded API’s and other interface helpers either disappeared or failed to operate properly.

Microsoft should take note of this issue and get it fixed. Even knowing that temp directories are not backed up is problematic. I am three days into using the restored drive and already, the system and other software have created 38 folders named ‘temp’. I did not create ANY of them myself.

To blindly assume that none of the files in these folders contain any useful data during a restore is a bit foolish in my opinion. Even if temp files became stale over time, my backups are at most 24 hours old.

So, now I am faced with how to manage the potential risk of having some necessary file being stored by a program in a temp direcory that will not be backed up. History shows that I cannot just delete all of the temp folders – they’ll just get recreated and used again.

What I think I need is a hack to the WHS backup code that allows backing up folders named temp, and the ability to exclude some of them at my choosing.

Alternate viewpoints welcomed. Any for any enterprising coders, there is value (at least to me) in the solution I mention above.

Doug S.

Alex Kuretz August 19, 2009 at 3:02 pm

I’m terribly sorry to hear of the issues you’ve encountered, Doug. :( The good news is that this issue is due to be resolved in the upcoming Power Pack 3 for Windows Home Server. I’ve not updated this blog post to reflect that new info since it is still in Beta and I’m waiting to see the fix in the final release before I call it resolved.

Doug Strahm August 19, 2009 at 3:55 pm

Alex,
That’s great news. I had always planned to do a bare metal recovery dry-run to test my diaster recovery process, but never got around to doing it until I really had to use it. It was surprising and very disappointing to find out the hard way.

I dug out the old hard drive and will slide it in an enclosure to see how many of the temp directory files I can recover manually. From the names and locations of the temp directories, there may be a substantial amount of data that did not get backed up and I never would have noticed until the old drive was deep in the landfill, or in parts strewn across my desk. (I still love taking things apart to see what’s inside!)

If it hadn’t been for your article I would not have realized what was causing the restore issues and realized that I needed to go back and recover the temp contents. THANKS!!

Doug S.

Comp1962 November 27, 2009 at 10:22 pm

Good to know about WHS not backing up and directories with the name TEMP. Personally all my temporary directories are called SORT like PICTURE SORT or VIDEO SORT etc but the exclusion of any part of the users backup should be left to the user. I was always under the impression that WHS backed everything up now I have to look closely at one of my clients to see if Rockwell Automation Software uses directories with the name TEMP.

Alex Kuretz November 28, 2009 at 1:16 am

Note that this was resolved in the Power Pack 3 release.

Comments are closed, visit the forums to continue the discussion.

{ 1 trackback }

Previous post:

Next post: