How to restore a corrupted file

Hi,

I have lost the data of a note (overwritten with lots of NULL, don’t know why).

Fortunately, there is a way to get it back …

… but …

… unfortunately, the clipboard button does not work.

What can I do to get this file back (repair clipboard or is it stored somewhere in the file system)?

I already tried “Save mode”, but it does not work.

I also tried this:

which shows no content and/or the clipboard holds nothing.

I

If you can’t find a proper solution, you could screenshot the text from the File Recovery window, then use an OCR (optical character recognition) app to extract the text from the screenshot(s).

This has happened to me once before on a Linux machine.

When I opened the file with the system file explorer, it still had the data.

I “saved” it by moving the file out of the vault with the system file explorer and then back into the vault. Obsidian started reading the file correctly afterward.

Maybe it will work for you as well.

1 Like

Thanks, but I tried this at first, without mentioning it in this thread, sorry.

Yes, I thought about this solution. But the obvious solution would be a working clipboard.

I could imagine that Obsidian stores the latest n versions of the files somewhere in the file system.

Yes, my suggestion is a last resort (but you might want to take the screenshots now, to be safe).

I could imagine that Obsidian stores the latest n versions of the files somewhere in the file system.

I would imagine it does, but I don’t know where. I don’t see anything in my vault’s .obsidian folder.

What’s your operating system? You could check the app-specific system folders, as well as /tmp or whatever Windows uses for temporary files.

Nothing found there … but fortunately on an other device. :wink:

If someone will work with obsidian, it is a basic requirement that the files don’t get corrupted and if they do for whatever reason, that he can always access and restore to the latest revisions. A daily backup does not solve the problem for overwritten files.

Are there any experiences with easy to use file revision systems for endusers (not github)?

For both of these things, can you please paste your “Show debug info”?

Is it this? (If not, please tell me.)

Ah nope not that. Run the command menu with Ctrl-P. And then run the command “Show debug info”

It will show details about your installation, plugins, versions, etc. Copy and paste that into here, if you please.

image

Ah, “Zeige Debug Informationen”.

SYSTEM INFO:
Obsidian version: v0.14.15
Installer version: v0.14.6
Operating system: Windows 10 Home 10.0.19044
Login status: not logged in
Insider build toggle: off
Live preview: off
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 7
Safe mode: off
Plugins installed: 19
Plugins enabled: 12
1: Templater
2: Style Settings
3: Recent Files
4: Outliner
5: Annotator
6: Dataview
7: Editor Syntax Highlight
8: Execute Code
9: Media Extended
10: Minimal Theme Settings
11: Number Headings
12: Tag Wrangler

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.

Ah right, apologies!

Let’s try to fix the broken clipboard button:

  1. What I would try and do is make a full backup copy of my vault first.
  2. Try setting “safe mode” on. I don’t know the menu in German, but the setting to deactivate all community plugins.
  3. Restart Obsidian. And see if the In Zwischenablage kopieren button begins working again. It may be a plugin interfering with this button, somehow.

If that still doesn’t work. I would try disabling your custom CSS snippets too, and try again. I don’t think that would be it, but it might interfere with the button.

If any of those fix your clipboard button, then it would be a matter of turning them back on slowly to test which breaks it. (My first suspicion would be any related to custom code or themes, like "Style Settings, “Minimal Theme Settings”, your custom snippets, or “Execute Code”.)


Finally, at the risk of preaching, don’t forget that the Obsidian plugin API is still in “early alpha”. You assume an amount of risk when you run community plugins, or custom code.

I don’t understand this statement. A daily snapshot/backup in a version control software like Git or SVN would absolutely help you fix problems like these. Personally, I use git, and I keep snapshots of my settings folder and my notes in separate commits.

You won’t believe - but the clipboard works again …

All these plugins work:

SYSTEM INFO:
	Obsidian version: v0.14.15
	Installer version: v0.14.15
	Operating system: Windows 10 Home 10.0.19044
	Login status: not logged in
	Insider build toggle: off
	Live preview: off
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 7
	Safe mode: off
	Plugins installed: 19
	Plugins enabled: 19
		1: Templater
		2: Style Settings
		3: Recent Files
		4: Outliner
		5: Annotator
		6: Dataview
		7: Editor Syntax Highlight
		8: Execute Code
		9: Media Extended
		10: Minimal Theme Settings
		11: Number Headings
		12: Tag Wrangler
		13: Obsidian Camera
		14: Timelines
		15: Periodic Notes
		16: Mind Map
		17: Kanban
		18: Calendar
		19: Advanced Tables

RECOMMENDATIONS:
	Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.

After this result, I fixed some minor css errors, which I checked with help of The W3C CSS Validation Service.

There were “only” some empty things like

color:  ;

or

color: xyz;

but validating and correcting made the tag colors work again.

But as far as I remember, I deleted an external plugin which had a release number 0.1 or 0.0.1 … I think, it is a good recommendation not to install such early software.

(I meant: When I make a daily backup in comparision to a real time backup and the note gets broken at the same day.)

Now I try RealTimeSync (from FreeFileSync), it seems to work with this settings.

image

Hope, that helps others.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.