Archive bit

from Wikipedia, the free encyclopedia

The archive bit (also archive attribute ) is a file attribute that is used in Microsoft operating systems to identify newly created or changed files. Data backup programs can thus signal that the file has not yet been backed up or has been modified since the last backup. The archive bit is supported by the file systems of the FAT family, NTFS and ZFS .

function

If a differential or incremental backup is not made, rather than a full backup, the backup program must recognize which files have been changed since the last backup. The most complex, but also the most precise method would be to compare the current file contents with those of the last backup. However, this process takes considerable time and the last backup must also be available, which is not the case, for example, if it is stored separately.

The archive bit should be a simple solution for this, supported by the operating system, since it is set with every write access. A backup program can then limit itself to backing up only those files for which the archive bit is set. It must then delete the archive bit again or set it to zero so that future modifications can be recognized again. However, the backup program or the user account under which it runs requires write rights for all files that it is supposed to back up.

The archive bit of the individual files is not set when entire folders are moved. There is a risk of consistency if a backup is only created using this attribute.

Unixoid systems

In the classic file systems of Unixoid systems , something comparable to the archive bit is not implemented. However, ZFS supports all file attributes of MS Windows and therefore also the archive bit. In order to ensure the interaction of Windows and classic Unix file systems, DOS attributes are mapped to Unix file rights. Samba achieves the mapping of the archive attribute by misappropriating the executable bit (x-bit). Similarly, the file attributes System and Hidden are also mapped in the x-bit:

Corresponding settings in Samba's configuration file ( smb.conf):

map archive = yes  # x für den Eigentümer
map system  = yes  # x für die Gruppe
map hidden  = yes  # x für alle

Under UNIX , a backup using the date attributes is common.

Backup strategies and the archive attribute

The archive bit is treated differently depending on the backup strategy.

  • With copy backup , i.e. burning data for backup purposes on CD or copying to an external hard drive, the archive attribute mostly remains unchanged (however, the archive bit can be used with xcopy, xxcopy, robocopy, for example).
  • The full backup saves all files - regardless of their attributes - and resets the archive attribute.
  • The differential backup saves all files that have changed since the last full backup and therefore have an archive bit set. The archive bit remains unchanged.
  • The incremental backup behaves differently depending on the implementation in the respective backup program. The archive bit may or may not be reset, as is usually the case with daily backups (the archive bit is ignored for daily backups because it is based on the date).

Individual programs can use other properties instead of this file attribute, e.g. B. Backup programs that use md5 or progressive backup , where file name, date and size are decisive (mainly used in enterprise solutions). In general, one can say that modern, professional software supports the archive bit, but normally doesn't work with it anymore. In the corporate environment, shadow copies (e.g. Volume Shadow Service, VSS), snapshots and progressive data backup are now used.

Limits

The control of data backups via the archive attribute fails if several backup tools are to be used independently of one another for a system to be backed up. This is often the case, especially with larger installations.

The use of the archive bit assumes that the reading backup tool converts the archive bit, i.e. has write access. If the backup concept provides that write access is only granted in the event of a restore, the archive attribute cannot be used.

swell

  1. ^ Effect of map archive in smb.conf Robert Eckstein, David Collier-Brown, Peter Kelly - Using Samba ISBN 0596007698
  2. Compare data backup with Windows XP