[Tutorial] The Dreaded Pound Signs: file reduced to ####

Home made tutorials, by users, for users
Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Locked
User avatar
Hagar Delest
Moderator
Posts: 32594
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

[Tutorial] The Dreaded Pound Signs: file reduced to ####

Post by Hagar Delest »

First, we do know and fully understand your frustration. Please remember that we are users like you, not developers. Are gathered here some hints that may help recovering your data. You might retrieve all, part of, or nothing at all from your work. Most of the time, you won't recover very much. However, it is worth trying.
The steps below can be a bit technical, so be prepared. Keep calm, and follow the instructions.
Note: for Mac users, the Tools>Options menu is OpenOffice.org>Preferences in the following steps.

Let's start with the basics: check the backup folder in your user profile
If you have activated the option Always create a backup copy in Tools>Options>Load/Save>General, each time you save manually a file (toolbar icon or Ctrl+S), the previous version is saved here (overwriting the former one). So you have the version n-1 stored in this folder, with the .bak extension. If you are lucky, just copy and paste this file somewhere else and rename that copy with the original file extension.
Nothing recoverable? Then next step...

Another try
Windows users
Hints from Bill:
- For Windows 7 and 10+: right-click the original file and select "Restore previous versions", select a version, then click "Restore"
- For Vista and Windows 8, use Shadow Explorer: Recover Files with Shadow Copies on Any Version of Windows Vista

Mac users
If you have enabled Time Machine (a standard feature of Mac OS X) you can use it to recover a previous copy of your file. See Finder → Help → Search → Time Machine Overview.

The target now is to check the temporary folder and see if the temporary files used by AOO are still there
Note: if you were working in an external format like .doc or .xls, then you're out of luck.
In AOO, go to Tools>Options>OO>Paths, see what is the path to your Temporary files.
Open your file browser (the one to browse the files on your hard drive, not your web browser) and go to that folder.
You should see folders with names like sgmlf.tmp; look inside, you should see files with a similar name and with the .tmp extension, make a copy of them in another folder and rename them to the relevant extension (.odt if you were working with a text document).
Try to open that file.

Still no luck? last try: hard drive digging
Your last hope is to use software that undelete files. In most cases, the files are not really erased, they are just unreferenced from the system "address book", waiting to be overwritten by another file needing the space.
Some recommended software:
- Recuva
- Photorec (note that it is not limited to pictures recovery, it can retrieve any kind of file)
Note that the trick here is to narrow the search as much as possible. To the file type especially: select archives (ODF is in fact a zip archive) and documents.
For an extensive tutorial, see also: [Tutorial] How to find and un-delete Writer temporary files.

How to avoid the hashes?
One of the root causes clearly identified is a power failure when saving. So to avoid any risk, make sure you shut off your computer properly. Don't hurry, let the files be written on the hard drive before closing the screen for example. Remember that to optimize performances, operating systems can cache the files before actually writing them, leading to a delay between the file is closed and its actual saving on the drive.
Most important, make back-ups often and in different locations to limit the loss if it happens.

Going further
You're not alone, see the list of topics already opened for that.
The bug report: Issue 107847 - File content changed to hashes at crash or power loss.
Feel free to vote for it (up to 2 votes per report). You'll have to register the Bugzilla if you don't have an account yet.
For the record here are the discussions about this problem on the AOO mailing lists (devs don't come in the forum):
- On dev ML (Dec. 15th, 2013): http://www.mail-archive.com/dev@openoff ... 15177.html (no reply at all as of today)
- On users ML (Jan. 4th, 2014): http://www.mail-archive.com/users@openo ... 02730.html

A survey had been created some time ago, now closed. For the record: Document Recovery Survey.

Note: LibreOffice has spent significant energy to rewrite the save process and does not suffer from this bug.
Last edited by MrProgrammer on Fri Sep 02, 2022 4:51 pm, edited 1 time in total.
Locked