This article needs additional citations for verification. (August 2022) |
In computing, ".bak" is a filename extension commonly used to signify a backup copy of a file.
When a program is about to overwrite an existing file (for example, when the user saves the document they are working on), the program may first make a copy of the existing file, with .bak appended to the filename. This common .bak naming scheme makes it possible to retrieve the original contents of the file in case of a failed write that corrupts the file, which could be caused by an operating system crash, power outage, or disk space exhaustion.
Without the backup file, an unsuccessful write event may truncate a file, meaning it cuts off the file at a position, or leaves a blank file. In practice, this could cause a written document to become incomplete or get lost, a multimedia project file (e.g. from a video editor) to become unparseable, and user preferences being reset to default.
In a similar manner, a user may also manually make a copy of the file before the change and append .bak to the filename, or alternatively save revisions into separate files, to facilitate reverting to an earlier revision in case of an error.
Other naming schemes are also in widespread use: file~, file.orig, file.old, and appended time stamps.
Database Applications like FoxPro and SQL Server use .bak files to back up their databases and other applications, like XML shell, create .bak files in their autosave process.[1] They do not get automatically deleted, so they need to be manually deleted after the process using it is stopped.
A significant portion of .bak files are simply renamed versions of standard file formats. For example, an estimated 15% of .bak files are underlying ZIP archives[2], while another 15% are AutoCAD DWG files. They frequently also contain SQL Server database backups or standard media and document formats such as JPG, DOCX, or PDF. Because the internal data remains unchanged, the original file can typically be restored by reverting the appended file extension to its original state.
References
- ^ "What Is a BAK File?". www.wisegeek.com. M. Haskins. Archived from the original on 7 May 2013. Retrieved 12 March 2013.
- ^ "BAK File Format". filext.com. FilExt.com. Retrieved 13 February 2026.
{{cite web}}: CS1 maint: url-status (link)
External links
- BAK file
- "BAK or BK File Format". Archived from the original on 2008-12-27.
- "FoxPro Commands That Create Backup (.BAK & .TBK) Files". Archived from the original on 2015-01-14.
