Windows backup: avoid the landmines


This article can also be found in the Premium Editorial Download "Storage magazine: .NET server storage: Friendly or not?."

Download it now to read this article plus other related content.

There's an old saying that the devil you know is better than the devil you don't know. For example, take the Windows operating system. It's easy to use, but this ease of use conceals a number of issues with the backup and recovery of NTFS and FAT filesystems.

The first issue is of long and short file names. For compatibility with MS-DOS, earlier versions of Windows and earlier applications, every version of Windows to date generates an 8.3 file name for every file with a long name, longer than the original MS-DOS 8.3 limitation. In Windows 2000 and XP, the 8.3 file name is generated as follows:

  • Delete Unicode characters from the file names that are illegal in MS-DOS.
  • Delete all periods but one (8.3 names can have only one period).
  • Truncate the file to six characters.
  • Append a tilde (~) and a number.
  • Truncate the file name extension to three or fewer characters.

Here's where the devil starts rearing its ugly head: As shown in the next code listing on the next page, C:My Documents becomes C:MYDOCU~1. If you then created another directory called C:My DocuDramas, its 8.3 file name would become C:MYDOCU~2.

C:> dir /x my*
 Volume in drive C has no label.
 Volume Serial Number is 1234-B6A4

Directory of C:

08/12/2001   10:09p

Requires Free Membership to View

<DIR> MYDOCU~1 My Documents 08/12/2001 11:19p <DIR> MYDOCU~2 My DocuDramas 0 File(s) 0 bytes 2 Dir(s) 1,818,880,512 bytes free

Most people understand the basics of what I've just described. What they usually don't know is this dynamic creation of the 8.3 file name also occurs during a restore. Therefore, the order that the files are restored will determine the 8.3 file name of files. Since the order that files are restored might not be the same as the order in which they were created, the 8.3 file name of any given file may be different after a restore. This is discussed in a Microsoft support document that can be found at: http://support.microsoft.com/support/kb/articles/Q240/2/40.ASP.

Microsoft says the Windows backup program will restore the file names in alphabetical order. This means that C:My DocuDramas will get restored before C:My Documents. Therefore, the 8.3 file name for C:My DocuDramas will be C:MYDOCU~1, and C:My Documents will become C:MYDOCU~2.

It's important to note that although the Microsoft support article only mentions Windows 2000's native backup program, the problem exists for any backup and recovery program. This is because Microsoft provides no API for backing up or recovering the short file name associated with a particularly long file name. Therefore, all backup and recovery products will have this issue.

My Windows-savvy friends aren't that concerned about this particular issue because they believe no modern application would make use of 8.3 file names. A quick scan of my Windows 2000 registry shows otherwise. I found dozens of references to short file names by many applications, most of which I have purchased within the last year. Also, people are tempted to use short file names when creating batch files or scripts, because doing otherwise would require quoting the file name. Obviously, only you can tell the degree to which this problem will affect your work.

Denying access
Another Windows peculiarity allows a user to block access to a storage administrator and to their files. Unix also allows an individual user to specify who can access their files - but no matter what - the root account can see any file. This is important for many reasons, one of which is backup and recovery. If root can't access your files, then the backup application can't back them up.

With NTFS, however, any user can right click on any directory, select Properties and the Security tab and will be presented with a dialogue box. In order to see this tab in Windows XP, you must disable simple file sharing. The user can then deny other users - including Administrator and System - access to their files by changing the access control lists (ACLs) for those files.

The default ACL contains permissions for Administrators, Everyone and System. The Administrator entry specifies what permissions someone logged in the computer as Administrator will have. The System entry specifies what access will be given to programs running under the System account - normally, commercial backup programs run under this account. The Everyone entry specifies anyone not specifically listed.

Users can, however, create an additional entry for the Administrator and then specify that the Administrator is denied all access. As strange as this may seem, this allows any user to deny access to the very people - and programs - that need access in order to do their job.

This was first published in August 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: