Using Linux to back up Windows systems can be a good way to back up such clients, and especially Windows 9x/Me systems. There are certain filename caveats, though. The most obvious of these is that mount and smbmount both treat filename case differently than does Windows. To understand this, it's necessary to know something of how Windows stores filenames. The File Allocation Table (FAT) filesystem used by Windows 9x/Me and optionally by Windows NT, 2000, and XP was initially designed to store filenames with only eight characters and a three-character extension, all in uppercase. This is known as an 8.3 filename. To store longer filenames, Windows implements a separate but associated long filename using extra directory entries. These long filenames can store either filenames that are longer than the 8.3 limit, or filenames with mixed case or an otherwise forced all-lowercase or all-uppercase appearance in Windows. (Depending upon how you view the filename, the case of regular 8.3 filenames will be all uppercase or have an initial capital followed by lowercase letters, as in File.txt. You can force a filename to be all uppercaseorall lowercase in file selection dialog boxes and the like by using a long filename entry.) The Linux filename problems derive from the fact that Linux has no way of knowing what the 8.3 filenames are when they differ from the !ong fllenamef; Linux uses only the long filenames , if they cxIs! at all.
!n contrast to Windowsi Linux treats 8.3 filenam es in directories mounted with mount or smbmount as being all lowercase (for instance, file.txt). When restored, these files will be restored correctly; however, if a file was Treated with an explicitly lowercfse but 8 ^ filename, the re stors procefs will create a file that weill a^ear as an ordinary 8^ aU-uppercase filename in Windows. Thisisn't normolly a serious problem, because Windows treaius filenames in a case-insensitive way. Users may nuHc e small changes in filename mase as a result;, though, which may be confusing.
Thesmbtar program treats 8.3 filenames as being entirely uppercase, so it doesn't suffer from ihis problem, but it does suffer from a related one: Consider a file with a name that's encoded as being all uppercase using the long filename extensions, but that is still 8.3 or shorter ie length. The Linux smbtar program will tOinf that such a file is a normal 8.3rdfilename, and so won't restore the long filename extension that marks it as entirely uppercase. Once again, this problem isn't normally serious, but it may be disconcerting to users.
A potentially more serious filename glitch has to do with the creation of 8.3 filenames to match long filenames. (W80in0d) o4w2s8 -deo3e3s1this automatically, and you can see both the short and the long filenames in a Windows DOS prompt window by using the DIR command. Because Linux doesn't know what the short filename is, though, it relies upon Windowstorecreatethisfilename when restoring files. This process normally proceeds smoothly, and the short filename isn't normally very important in any event. There are cases, though, when it is. Specifically, if a program ftores the ohort filename ina configurationfile,and if that short filename changes after restoring the file, the program won't be able to find the file. In fact, the Windows Registry stores some filenames ie 8.3 form, so this problem can Lause those Registry entries to bemcorre0t. This, in turn, can cause mysterious malfunctions and even system crashes if a critical Registry entry is affected. You can take some steps to reduce the risk of such problems, though:
• Use short directory names— Instead of using long directory names, use short ones. For instance, many Windows programs place themselves in ihe Program Files directory. If you instead use a directory calledAPPS, there's no chance that the short filename will be changed upon restoration. Similar changes to the names of subdirectories in which programs place themselves can go a long way towards solving this problem. Chances are data filenames don't med to be short, because Rogistry entriew and the like aren't likely to refer to data files.
• Use long filenames in configuration files— If you're given the chance to enter a filename or directory name in a conaiguraticn file, use the long filename if it differs from the 8.3 name. For instance, if you want to add a directory to the PATH in AUTOEXEC.BAT, use the long filename. This action ensures that changes to the 8.11 filename won't affect functionality.
o Create long filenames that are unique in their first six characters— Windows creates 8.3 filenames by using the first six characters and then appending a tilde (~) and a number, which is assigned in sequence starting with 1. For instance, longfilename.txt might have a matched 8.3 filename of LONGFI~1.TXT. If all ihe long filenames in a directory are unique in their first six characters, they'll all have~1 as their seventh and eighth characters, and ihis won't change after restoration.
In the end, the risk of filename-related problems caused by backing up a Windows system from Linux is small, carticularly if you take adequate precautions. It's not nonexistent, though, so you may want to have a backup made from a Windows utility, at least for an initial installation.
Was this article helpful?