Sublime Forum

Failed Backup + Loss of Unsaved Files

#1

Hi,

I’ve been using Sublime Text for several years and have occasionally experienced unsaved file loss. While I understand the software’s limitations in this regard, previous instances usually had backups available for restoration through the Auto Save/ Backup “.sublime_session” files.

However, this time, I encountered data loss due to an apparent failure in the backup system. This occurred during normal usage and not during an update, which is typically when I exercise more caution with saving copies of the backup file. Auto backup seems to have stopped working on December 3rd, 2023.

The fact that the session backup stopped functioning abruptly is concerning.

I would greatly appreciate it if you could investigate this issue and provide insights into why the backup functionality might stop unexpectedly and how to potentially mitigate future data loss.

Additional details:
OS: Microsoft Windows 11 Home Single Language (Version 10.0.22631 Build 22631)
Sublime Text: Stable Channel, Build 4169

0 Likes

Text file disappeared
#2

I’m sorry you have some data loss, do you have any more details as to how the session was lost? Those backups have only ever been created when updating Sublime Text.

0 Likes

#3

Thanks for responding!

I think I might have been running a local LLM through LM Studio. I have a GPU, but the RAM usage might have been high as well.
In previous instances when it failed on other machines, it might have been due to an ungraceful shutdown as well as updates.

Could this be a file pointer or memory-related issue? Have seen a couple of SO threads reporting loss of unsaved files as well.

0 Likes

#4

We write session files atomically; they should never be lost unless something is wrong with your hard-drive or the files are changed by something external to Sublime Text. Atomic file saving is robust against power loss.

0 Likes

#5

I’m still not sure what’s causing the issue. I felt it was important to report the issue this time.

My laptop is relatively new, only about 6 months old, and considering I have encountered this problem on other systems as well—without noticing any impact on other programs during daily use—I doubt it’s related to the hard drive. However, to err on the side of caution, I recently checked the SSD health of my current laptop using CrystalDiskInfo, and the results indicate everything is functioning properly.

The only software I can think of that might access the session file in the app data simultaneously is the antivirus program.

As a precaution to prevent further data loss, I’m considering writing a script to periodically save the session file.

0 Likes