Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

More backups. Less history. How does that happen?

Description and use

Automated tools that backup on every launch can overwrite useful history when merges are identical. A patch that compares byte‑identical content prevents redundant backups, preserving the original configuration.

Problem

Automated tools that create a backup on every launch can overwrite useful history when successive merges are identical, leading to a backup folder that contains only the latest version and no recoverable older settings.

Outcome

The patch prevents unnecessary backups when the merged content is byte‑identical, reducing backup count from ten to one and preserving the original configuration. However, formatting changes still produce new backups, indicating that deduplication is based on byte equality, not semantic changes.

Workflow

  • 1. Start with an old configuration file.
  • 2. Merge a new setting into the file using the original code.
  • 3. Repeat the merge 27 times with identical content.
  • 4. Observe that 10 backup files are kept, all identical to the current file, and the original settings are lost.
  • 5. Apply the patch that compares the proposed output with the existing bytes before writing.
  • 6. Repeat steps 1–3 with the patched code.
  • 7. Observe that only one backup file is kept and the original settings survive.
  • 8. Run eight concurrent processes after the initial change to test lock protection.
  • 9. Verify that the patched version retains only the original backup while the original code retains nine backups of the new content.
  • 10. Perform deliberate formatting rewrites to test byte‑identical detection.
  • 11. Observe that both versions keep ten backups and lose the original settings when formatting changes bytes.

Evidence

Before the patch, later merges kept saving the new settings again until the first backup fell outside the ten-file window.

Source

After the patch, unchanged merges stopped consuming that window. Fewer backup files preserved more useful history.

Source

We also ran eight concurrent processes after the initial change. The old version retained nine backups; the patched version retained only the original old content.

Source

  • Record date: 2026-09-21T11:30:23.627Z