Sublime Forum

Went to update, and lost all my data

#1

So, I had about 15 tabs of code that I have had for about a year. I would go to file>save so I thought I had saved it. I clicked to download the updated version this morning and before I even ran the new .exe all of my data is gone. We have checked C:\Users\juhull\AppData\Roaming\Sublime Text 3 and C:\Users\juhull\AppData\Local\Sublime Text 3 and there is nothing in them.

Is it at possible to retrieve my lost text?

0 Likes

#2

The Sublime update doesn’t touch the Data directory where your user settings are stored (including when you uninstall Sublime completely and then install it again). If your files were saved to disk and now seem to be gone, a possible reason for that would be that you saved them into the Sublime install directory.

If that’s the case, the installer may have deleted your files as part of the upgrade by removing the old install folder and replacing it with a folder for the new version.

If that’s the case, you may want to check your recycle bin to see if the old folder ended up there, in which case you can get your files back.

0 Likes

#3

I checked the recycle bin and found the old C:\Program Files\Sublime Text 3 (3143) folder and restored it. However, it doesn’t appear to contain any data files.

To be clear, I’m looking in C:\Users\juhull\AppData\Roaming\Sublime Text 3 and seeing 3 files -

Auto Save Session.sublime-workspace
Session.sublime_session
Session.sublime-workspace

Those are my data files, correct? All of them have modified timestamps showing they were modified after the update, and they are really small - 3kb, 7kb, 3kb. When I try to load them in sublime they only open 1 tab, with odd content:
Auto Save Session.sublime-workspace shows:

{
“auto_complete”:
{
“selected_items”:
[
]
},
“buffers”:
[
],
“build_system”: “”,
“build_system_choices”:
[
],
“build_varint”: “”,
“command_palette”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“console”:
{
“height”: 0.0,
“history”:
[
]
},
“distraction_free”:
{
“menu_visible”: true,
“show_minimap”: false,
“show_open_files”: false,
“show_tabs”: false,
“side_bar_visible”: false,
“status_bar_visible”: false
},
“file_history”:
[
“/C/Program Files/Sublime Text 3/sublime.py”,
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings”,
“/C/Program Files/Sublime Text 3/sublime_text.exe”
],
“find”:
{
“height”: 0.0
},
“find_in_files”:
{
“height”: 0.0,
“where_history”:
[
]
},
“find_state”:
{
“case_sensitive”: false,
“find_history”:
[
],
“highlight”: true,
“in_selection”: false,
“preserve_case”: false,
“regex”: false,
“replace_history”:
[
],
“reverse”: false,
“show_context”: true,
“use_buffer2”: true,
“whole_word”: false,
“wrap”: true
},
“groups”:
[
{
“sheets”:
[
]
}
],
“incremental_find”:
{
“height”: 0.0
},
“input”:
{
“height”: 0.0
},
“layout”:
{
“cells”:
[
[
0,
0,
1,
1
]
],
“cols”:
[
0.0,
1.0
],
“rows”:
[
0.0,
1.0
]
},
“menu_visible”: true,
“output.find_results”:
{
“height”: 0.0
},
“pinned_build_system”: “”,
“project”: “Auto Save Session.sublime-project”,
“replace”:
{
“height”: 0.0
},
“save_all_on_build”: true,
“select_file”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_project”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_symbol”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“selected_group”: 0,
“settings”:
{
},
“show_minimap”: true,
“show_open_files”: false,
“show_tabs”: true,
“side_bar_visible”: true,
“side_bar_width”: 150.0,
“status_bar_visible”: true,
“template_settings”:
{
}
}

Session.sublime_session shows:

{
“folder_history”:
[
],
“last_version”: 3143,
“last_window_id”: 5,
“log_indexing”: false,
“settings”:
{
“new_window_height”: 480.0,
“new_window_settings”:
{
“auto_complete”:
{
“selected_items”:
[
]
},
“build_system_choices”:
[
],
“build_varint”: “”,
“command_palette”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“console”:
{
“height”: 0.0,
“history”:
[
]
},
“distraction_free”:
{
“menu_visible”: true,
“show_minimap”: false,
“show_open_files”: false,
“show_tabs”: false,
“side_bar_visible”: false,
“status_bar_visible”: false
},
“file_history”:
[
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Auto Save Session.sublime_session”,
“/C/Program Files/Sublime Text 3/sublime.py”,
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings”,
“/C/Program Files/Sublime Text 3/sublime_text.exe”
],
“find”:
{
“height”: 0.0
},
“find_in_files”:
{
“height”: 0.0,
“where_history”:
[
]
},
“find_state”:
{
“case_sensitive”: false,
“find_history”:
[
],
“highlight”: true,
“in_selection”: false,
“preserve_case”: false,
“regex”: false,
“replace_history”:
[
],
“reverse”: false,
“show_context”: true,
“use_buffer2”: true,
“whole_word”: false,
“wrap”: true
},
“incremental_find”:
{
“height”: 0.0
},
“input”:
{
“height”: 0.0
},
“menu_visible”: true,
“output.find_results”:
{
“height”: 0.0
},
“pinned_build_system”: “”,
“replace”:
{
“height”: 0.0
},
“save_all_on_build”: true,
“select_file”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_project”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_symbol”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“show_minimap”: true,
“show_open_files”: false,
“show_tabs”: true,
“side_bar_visible”: true,
“side_bar_width”: 150.0,
“status_bar_visible”: true,
“template_settings”:
{
}
},
“new_window_width”: 640.0
},
“windows”:
[
{
“auto_complete”:
{
“selected_items”:
[
]
},
“buffers”:
[
{
“file”: “/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Session.sublime_session”,
“settings”:
{
“buffer_size”: 7012,
“line_ending”: “Unix”
}
},
{
“file”: “/C/Program Files/Sublime Text 3 (3143)/sublime_text.exe”,
“settings”:
{
“buffer_size”: 18201880,
“encoding”: “Hexadecimal”,
“line_ending”: “Unix”
}
}
],
“build_system”: “”,
“build_system_choices”:
[
],
“build_varint”: “”,
“command_palette”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“console”:
{
“height”: 0.0,
“history”:
[
]
},
“distraction_free”:
{
“menu_visible”: true,
“show_minimap”: false,
“show_open_files”: false,
“show_tabs”: false,
“side_bar_visible”: false,
“status_bar_visible”: false
},
“file_history”:
[
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Auto Save Session.sublime_session”,
“/C/Program Files/Sublime Text 3/sublime.py”,
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings”,
“/C/Program Files/Sublime Text 3/sublime_text.exe”
],
“find”:
{
“height”: 0.0
},
“find_in_files”:
{
“height”: 0.0,
“where_history”:
[
]
},
“find_state”:
{
“case_sensitive”: false,
“find_history”:
[
],
“highlight”: true,
“in_selection”: false,
“preserve_case”: false,
“regex”: false,
“replace_history”:
[
],
“reverse”: false,
“show_context”: true,
“use_buffer2”: true,
“whole_word”: false,
“wrap”: true
},
“groups”:
[
{
“selected”: 1,
“sheets”:
[
{
“buffer”: 0,
“file”: “/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Session.sublime_session”,
“semi_transient”: false,
“settings”:
{
“buffer_size”: 7012,
“regions”:
{
},
“selection”:
[
[
0,
0
]
],
“settings”:
{
“syntax”: “Packages/Text/Plain text.tmLanguage”,
“translate_tabs_to_spaces”: false
},
“translation.x”: 0.0,
“translation.y”: 0.0,
“zoom_level”: 1.0
},
“stack_index”: 1,
“type”: “text”
},
{
“buffer”: 1,
“file”: “/C/Program Files/Sublime Text 3 (3143)/sublime_text.exe”,
“semi_transient”: false,
“settings”:
{
“buffer_size”: 18201880,
“regions”:
{
},
“selection”:
[
[
9959,
9959
]
],
“settings”:
{
“syntax”: “Packages/Text/Plain text.tmLanguage”
},
“translation.x”: 0.0,
“translation.y”: 6384.0,
“zoom_level”: 1.0
},
“stack_index”: 0,
“type”: “text”
}
]
}
],
“incremental_find”:
{
“height”: 0.0
},
“input”:
{
“height”: 0.0
},
“layout”:
{
“cells”:
[
[
0,
0,
1,
1
]
],
“cols”:
[
0.0,
1.0
],
“rows”:
[
0.0,
1.0
]
},
“menu_visible”: true,
“output.find_results”:
{
“height”: 0.0
},
“pinned_build_system”: “”,
“position”: “0,2,3,-1,-1,-1,-1,747,208,208,864”,
“project”: “”,
“replace”:
{
“height”: 0.0
},
“save_all_on_build”: true,
“select_file”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
[
“”,
“C:\Users\juhull\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session”
]
],
“width”: 0.0
},
“select_project”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_symbol”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“selected_group”: 0,
“settings”:
{
},
“show_minimap”: true,
“show_open_files”: false,
“show_tabs”: true,
“side_bar_visible”: true,
“side_bar_width”: 150.0,
“status_bar_visible”: true,
“template_settings”:
{
},
“window_id”: 2,
“workspace_name”: “”
}
],
“workspaces”:
{
“recent_workspaces”:
[
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Session.sublime-workspace”,
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Auto Save Session.sublime-workspace”
]
}
}

Session.sublime-workspace shows:

{
“auto_complete”:
{
“selected_items”:
[
]
},
“buffers”:
[
],
“build_system”: “”,
“build_system_choices”:
[
],
“build_varint”: “”,
“command_palette”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“console”:
{
“height”: 0.0,
“history”:
[
]
},
“distraction_free”:
{
“menu_visible”: true,
“show_minimap”: false,
“show_open_files”: false,
“show_tabs”: false,
“side_bar_visible”: false,
“status_bar_visible”: false
},
“file_history”:
[
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Local/Auto Save Session.sublime_session”,
“/C/Program Files/Sublime Text 3/sublime.py”,
“/C/Users/juhull/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings”,
“/C/Program Files/Sublime Text 3/sublime_text.exe”
],
“find”:
{
“height”: 0.0
},
“find_in_files”:
{
“height”: 0.0,
“where_history”:
[
]
},
“find_state”:
{
“case_sensitive”: false,
“find_history”:
[
],
“highlight”: true,
“in_selection”: false,
“preserve_case”: false,
“regex”: false,
“replace_history”:
[
],
“reverse”: false,
“show_context”: true,
“use_buffer2”: true,
“whole_word”: false,
“wrap”: true
},
“groups”:
[
{
“sheets”:
[
]
}
],
“incremental_find”:
{
“height”: 0.0
},
“input”:
{
“height”: 0.0
},
“layout”:
{
“cells”:
[
[
0,
0,
1,
1
]
],
“cols”:
[
0.0,
1.0
],
“rows”:
[
0.0,
1.0
]
},
“menu_visible”: true,
“output.find_results”:
{
“height”: 0.0
},
“pinned_build_system”: “”,
“project”: “Session.sublime-project”,
“replace”:
{
“height”: 0.0
},
“save_all_on_build”: true,
“select_file”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_project”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“select_symbol”:
{
“height”: 0.0,
“last_filter”: “”,
“selected_items”:
[
],
“width”: 0.0
},
“selected_group”: 0,
“settings”:
{
},
“show_minimap”: true,
“show_open_files”: false,
“show_tabs”: true,
“side_bar_visible”: true,
“side_bar_width”: 150.0,
“status_bar_visible”: true,
“template_settings”:
{
}
}

0 Likes

#4

The directory you’re referring to here is what Sublime knows as the Data directory; it’s the place where your custom user settings and all of the packages that you install end up; it’s also the place where the state of the application is stored. This area is left alone by an install, reinstall or uninstall of Sublime (which is one reason why if you’re having problems with Sublime, reinstalling it is generally not going to help).

The sublime_session file that you’re seeing there is the information that Sublime uses to restore itself to the state it was in when you terminated it (if you have hot_exit turned on); it knows things like what files you had open, the customized settings of those files (if any) or the buffer contents if there were unsaved changes in the file when you quit, among other things.

A sublime-workspace file is similar, but those files store the state of a particular window or sublime-project file. For example for every sublime-project that you have, there are one or more sublime-workspace files that provide the same session state as sublime_session, but for that file; so if you have a window with a project in it, you can close the window and the next time you open that project the window ends up back the way it was before.

The only time buffer contents are stored in the session or workspace files is (as far as I’m aware) when the file has unsaved changes that haven’t been written to disk, which includes files that you’ve started working on but haven’t saved for the first time yet. Additionally this only happens when hot_exit is turned on; otherwise you get prompted to save your unsaved work first,

Since you said that you remember saving the files, the contents of them is not likely to show up in the session or workspace files. The Data directory is left alone during the update process but the application directory where the Sublime binary is gets replaced with a new version of Sublime.

If you were storing the files you were working on in that folder, I think you would have found them in the version of the folder that was in the recycle bin.

Based on all of this is sounds like you had some files open that you were working on, and as a part of the upgrade the session file got somehow reset. One possible reason for that is having more than one Sublime window open and closing the one that was empty last; since that’s the one that was open, that gets stored as the most recent session.

The files not being in the install folder (which is a good thing) makes it sound like your files are still present on your computer but Sublime doesn’t know that you were editing them. In that case as long as you know where you saved them they should still be there and you can open them again.

To that end my best advice would be that if you remember one of the names of the file that you were editing (or the contents of it) a search in the windows explorer may be able to find the files for you if you’re not sure where they are.

0 Likes