Jump to content

Archive bit

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 89.204.152.53 (talk) at 06:04, 16 August 2011 (s/a full 100% of the files/all files/ - this article should be merged into the "attrib" article (or "replace"/"xcopy", also related to this not really notable bit)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The archive bit is a file attribute used in the file system of computer operating systems. In an operating system, such as DOS, OS/2, Win95/98, WinNT/2000/XP, the file system maintains file attributes for every file and directory to keep track of information such as file name and size.

Primarily, the archive bit is used by backup software to indicate whether a file has been backed up. When a file is created or modified, the archive bit is set, and when the file has been backed up, the archive bit is cleared. It is by use of the archive bit that incremental backups are possible.

Backup software also provides the option to do a full backup while clearing archive bits - that is, to back up all files irrespective of the archive bit, but to clear the archive bit of all files in the backup for the future. This allows for the creation of an initial full backup that will be supplemented by incremental backups in the future.

The operating system never clears the archive bit on its own, unless explicitly told to do so by the user. In MS-DOS as well as nearly all versions of Windows, the archive bit can be seen or changed with the attrib command-line utility, or by viewing the properties of a given file with the Windows shell. The archive bit can also be seen or changed with the [GetFileAttributes], [GetFileAttributesEx] and [SetFileAttributes] Windows APIs.

When a file with a clear archive bit is moved from one place on a file system to another, the archive bit reverts to being set.

Typically, on a computer system that has never been backed up in a manner that clears archive bits, all files on that computer will have their archive bits set, as there are few applications that make use of archive bits without the user's request.

As the archive bit is a file attribute and not part of the file itself, the contents of the file are unrelated to the status of the archive bit and remain unchanged even if the setting of the archive bit is changed.

Issues

Relying on the archive bit for backing up files can be unreliable if multiple backup programs setting and clearing the attribute bit on the same volume. Another possibility is to use information of last change to the file or directory.

See also