File backup on save¶
OctoEdit can keep a backup of a file's previous contents whenever you save over it, so a bad save never costs you the earlier version. It is off by default — turn it on in Preferences ▸ General ▸ Backup.
Backups are made only when you save your own document. A brand-new file's first save has nothing to back up, and internal working copies (such as the session's unsaved-buffer store) are never backed up.
Modes¶
- Off — no backups (default).
- Single copy — one
‹name›.‹ext›.bak, overwritten on every save. It sits next to the original file or in the backup folder, depending on Location. - Timestamped copies — a new
‹name›.‹ext›.‹YYYY-MM-DD_HHMMSS›.bakin the backup folder on every save, so you keep a history.
Settings¶
Under Preferences ▸ General ▸ Backup:
| Setting | What it does |
|---|---|
| Mode | Off / Single copy / Timestamped copies. |
| Location | For Single copy: next to the original file, or in the backup folder. |
| Folder | The backup folder (used by Timestamped copies, and by Single copy when its location is the backup folder). Browse… picks it and warns immediately if the folder is not writable. |
| Retention | For Timestamped copies: keep the last N copies (older ones are deleted automatically) or keep all (you clean up yourself). |
| Keep | How many copies to keep when retention is "keep the last N". |
If a backup can't be made¶
If OctoEdit can't write the backup (for example the folder is read-only), it does not overwrite your file silently. Instead it asks what to do:
- Save As… — save to a different file (your original is left untouched);
- Overwrite without backup — save anyway, without a backup;
- Cancel — stop; nothing is written.
Save As¶
Using File ▸ Save As… does not create a backup of the file you save onto — you have explicitly chosen that destination (the usual "replace this file?" confirmation still applies).