Skip to content

[SUGGESTION] Improve autosave system with backup (.bak) support #58

@Nico-du-34

Description

@Nico-du-34

Feature request

Add automatic creation of a .bak backup file for autosave.json before each save.

Problem

The autosave.json file can become corrupted in case of a crash, forced shutdown, or interruption during the save process.

In my case:

  • the autosave.json file was corrupted
  • the project could no longer be loaded properly
  • after manually fixing the file, a large part of the data was missing
  • no backup was available to restore a previous version

Proposed solution

Before overwriting autosave.json, automatically create a backup:

  • autosave.json.bak

Expected behavior

On each save:

  1. Rename the current autosave.jsonautosave.json.bak
  2. Write the new autosave.json

Possible improvements (optional)

  • Keep multiple backups (autosave.json.bak1, .bak2, etc.)
  • Add a safer auto-save system (write to a temp file, then replace)
  • Display an error message if the save process fails

Why this is important

The autosave.json file contains the entire project. If it gets corrupted, it can lead to significant data loss.

A simple backup system would help prevent this issue.

Thank you for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions