Getty Images/iStockphoto

Tip

Get to know the archive bit and its role in data backup

Good data management is key to protecting critical files. A tool like the archive bit can help ensure backup administrators know what data needs to be backed up at a glance.

The archive bit has existed in Microsoft Windows since the very beginning and was a part of MS-DOS long before that. While there are applications that can serve the same purpose, the archive bit backup function remains a viable option.

The archive bit, which has since been adopted by other operating systems, helps backup software know what data needs to be backed up and what data has already been backed up.

The archive bit is a file attribute. Windows and the Microsoft Disk Operating System (MS-DOS) have supported several different attributes that can be applied to files.

For example, with the hidden attribute, users can make the file system not display a particular file. Other commonly used attributes include system, which designates a file as a system file, and read-only, which causes a file to be treated as read-only and unable to be modified. The archive bit is another attribute users can apply to files. For backup administrators in particular, the archive bit can be a helpful tool.

The archive bit as a backup tool

Anytime a user creates a new file on a Windows PC, the archive bit is applied to the file. This tells the operating system that the file needs to be backed up. When you run a backup, the backup software will clear the archive bit to indicate that the file has been backed up. If the file is later modified, then the archive bit is turned back on to indicate that the file once again needs to be backed up.

Not all backup applications work in the same way. Some backup applications ignore the archive bit completely. Others might clear the archive bit as part of an incremental backup, but leave the archive bit set when a full backup is run. It's ultimately up to the backup vendor to decide whether and how to use the archive bit.

Current, quality backups are critical to data protection. A tool like the archive bit can help backup administrators by simply indicating if a backup has already taken place.

Using the archive bit

MS-DOS included a command called attrib, which could be used to see the attributes that were assigned to a file. This tool still exists in Windows today and is accessible through the Windows command prompt window.

In the screenshot below, you can see that I have typed attrib test.txt. This causes Windows to show the attributes that are assigned to a file called test.txt in the current folder. In this case, there are no attributes assigned to the file.

Screenshot of the attrib command in Windows.
The attrib command is used to display a file's attributes.

Now, I will modify the file and run the attrib command again. This time, you can see the letter A appear to the left of the file name. This indicates that the archive bit has been set.

Screenshot of the attrib command with the archive bit enabled.
The archive bit has been enabled.

Incidentally, you can use the attrib command to manually set or remove the archive bit. To remove the archive bit, just append the -A switch to the attrib command. You can use the +A switch to turn the archive bit back on. You can see an example of this below.

Screenshot of the user manually removing and adding the archive bit.
The user can manually control the archive bit.

Users can set a file's archive bit without having to use the command line, but the command line is preferable because it enables scripted operations. To use the GUI instead, users can right-click on a file and select the Properties command from the shortcut menu. The resulting sheet's General tab contains an Attributes section. If this section only lists the read-only and hidden attributes, clicking the Advanced... button gives you access to the archive bit, as shown below.

Screenshot of the user in the GUI activating the archive bit.
The archive bit is accessible through the Windows GUI.

Brien Posey is a 22-time Microsoft MVP and a commercial astronaut candidate. In his more than 30 years in IT, he has served as a lead network engineer for the U.S. Department of Defense and a network administrator for some of the largest insurance companies in America.

Dig Deeper on Archiving and tape backup

Disaster Recovery
Storage
ITChannel
Close