backup - Automatic file backup of last edit
backup Mode
B - mode line letter.
backup mode, when enabled, performs an automatic backup of the last edit when a save file operation is performed. The backup file name is derived from the base file name and is written into the same directory as the source file.
On unlimited file name length systems the naming convention used depends on bit 0x400 of variable $system(5), if this bit is set then the system simulates a DOS style 8.3 file naming convention. If this bit is clear then variable $kept-versions(5) can be used to create multiple backup files.
Where an existing backup file already exists, then the old backup file is removed and replaced by the newer backup file. The naming convention for backup files is defined as follows:-
On unlimited length file name systems (UNIX and some Windows systems) with a single backup file, the following file naming conventions are used for file xxxxx:
xxxxx -> xxxxx~
On unlimited length file name systems with multiple backup files, the following file naming conventions are used for file xxxxx:
xxxxx -> xxxxx.~?~
Where ? is the backup number, the most recent backup file is always ".~0~".
On systems with an xxxxxxxx.yyy file name (MS-DOS etc), the following file naming conventions are used:
xxxxxxxx -> xxxxxxxx.~~~
xxxxxxxx.yyy -> xxxxxxxx.yy~
xxxxxxxx.yyyy -> xxxxxxxx.yyy~
backup is enabled by default.
Reference should also be made to undo(2) which allows previous edits to be removed. Also see $auto-time(5) and autosv(2m) which allows a timed backup of a running edit to be periodically performed.
The user is warned to be extra careful if files ending in '~' or '#'s are used, it is advisable to disable backup creation (see global-mode(2)) and auto-saving ($auto-time = 0). The author denies all responsibility (yet again) for any loss of data! Please be careful.
(c) Copyright JASSPA 1999
Last Modified: 1998/08/27
Generated On: 1999/12/01