Lost my snippets data during syncing.
LazyKnightX opened this issue · 2 comments
Hi
Regarding the data loss:
could you please briefly describe how the loss happened? If you used vscode sync, you can try to restore snippets by using vscode's built-in backup mechanisms: https://code.visualstudio.com/docs/editor/settings-sync#_restoring-data
Regarding where the data is stored:
Vscode has a state.vscdb
file. On my machine (Ubuntu Linux), it is located in ~/.config/Code/User/globalStorage/state.vscdb
.
To inspect the content of this file, you can use any tool that can open SQLite, for example, you can go to this website: https://inloop.github.io/sqlite-viewer/, upload the file and type the following command:
SELECT * FROM 'ItemTable' WHERE key like 'vscode-snippet.snippet'
then click "Execute".
You should find a single row with key vscode-snippet.snippet
and value equal to json. This json is where snippets are stored.
Thank you for the help, VladBrok.
The situation happens:
- I enabled my home computer's vscode sync, which does not contain snippet data.
- I went to the company.
- I enabled my work computer's vscode sync.
- My data was replaced by my home computer's data, which does not contain snippet data.
I restored my data successfully by using the vscode's built-in backup mechanisms.
Your snippet extension is the best one I've found in those years, I really enjoy it.
Cheers! 👍