Emacs backup file recovery and manual integrity verification
0 reputation · 26 Feb 2021, 20:40 UTC
Goal
Restore a buffer from an Emacs backup or auto-save file and confirm that the recovered content is complete before saving it over the original file.
Constraints and uncertainty
Emacs writes tilde backups and #file# auto-save files according to make-backup-files, version-control, auto-save-default, and backup-directory-alist. recover-file can visit a newer auto-save, but Emacs does not automatically checksum, validate, or sandbox recovered data. Permissions follow the process umask and directory settings, so backups in shared locations may be readable by others. Numbered backup rotation can remove older revisions. Behavior varies by Emacs release.
Because no built-in integrity gate exists, the user must decide when a backup is trustworthy.
Questions
- Which Emacs variables determine backup file location and permission restrictions for shared directories?
- Is there a supported way to require content comparison before recover-file replaces the original buffer?
- How should teams verify recovered data confidentiality and completeness when automatic checks are absent?