Page 1 of 1

Recovering previous versions of documents

Posted: Wed Apr 22, 2015 4:46 am
by AlphaFoley
So I was writing a final paper for one of my classes with 11 pages of work done. I inserted a page break and started on a new page. I guess somehow, I don't know how, the 11 pages of work I did got deleted (maybe after editing it to be double spaced I accidentally deleted it and didn't realize it. It just got deleted.) Of course, I didn't realize that all of the work got deleted and saved somewhere in between it getting deleted and working on the new page. (I also just realized while finishing this post that if I had kept up the original document I might have been able to undo until I got to the point where the work got deleted) After working on the new page for awhile, I realized that OpenOffice displayed the document as being only one page, and I realized that indeed, all of the pages of the work I did were gone. I already tried restoring previous versions via the properties and 'previous versions' tab, and there were none. I already tried seeing if there were back ups by going to tools > options > paths > backups and then going to the appropriate folders; there were no back ups.
So basically I guess what I'm asking is that I don't have back ups nor previous versions of my document. I've already google'd like a maniac to look for a way to recover the document, but haven't found anything. Is it a lost cause, or is there still hope for recovering the document?
And yeah, for the future this is a painful reminder to not just save the document, but to save multiple versions of the document. Sorry for the long read, I'm just super frustrated.

Re: Recovering previous versions of documents

Posted: Wed Apr 22, 2015 7:11 am
by Zizi64
Do not have any copy of your document (Was not sent as E-mail attachment, have not a pendrive archive)?
If NOT, the nothing to do.

The Openoffice can create 1 backup file for each active document into the Backup directory - after you set the "Allways create a backup copy" option at the 'Tools - Option - Load/Save - General - Save' menu item. But it will overwrited at every time when you click on the Save icon.

And yeah, for the future this is a painful reminder to not just save the document, but to save multiple versions of the document.
You can use a simple macro for this. It will make a normal save , and then export atimestaped copy of the actual document into the "Backup" folder:

Code: Select all

Sub SaveAndTimeStampBackup()

Dim sDocURL as string, sBackupURL as string, sTimeStamp as string
Dim oDoc as object

   If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
      GlobalScope.BasicLibraries.LoadLibrary("Tools")
   End If
   sTimeStamp = "_" & Format(Year(Now), "0000") & Format(Month(Now), "00") & Format(Day(Now), "00") & "_" & _
                       Format(Hour(Now), "00") & Format(Minute(Now), "00") & Format(Second(Now), "00")
   oDoc = Thiscomponent   
   If oDoc.hasLocation() then
      sDocURL = oDoc.getURL()

      sBackupURL = CreateUnoService("com.sun.star.util.PathSettings").Backup & "/" & _
      GetFileNameWithoutExtension(sDocURL, "/") & _
      sTimeStamp() & "." & _
      GetFileNameExtension(sDocURL, "/")   
   
      oDoc.store() ' Save
      oDoc.storeToURL(sBackupURL, array())  ' Backup
   Else
      MsgBox("This document have not URL. Can not be archived." & Chr(10) & "Use the normal 'save' procedure.",16,"Warning:")
   End if
End sub
The path of the "Backup" directory is given in Settings.
(Tools - Options - Open/LibreOffice - Paths). (You can modify the path as you want.)


OpenOffice 3.1 on Windows 7
The OOo 3.1 is a very old version. You need upgrade your software, and/or update your signature.

The latest versions:

LibreOffice 4.4.2 Fresh (or LO 4.3.6 Still)
Apache OpenOffice 4.1.1

Re: Recovering previous versions of documents

Posted: Thu Apr 23, 2015 1:19 am
by AlphaFoley
Whoops, the 3.1 in my signature is a typo. Meant to put 4.1
Anyway, thanks for the response. I've given up the ghost for this document and will take necessary measures to make sure it wont happen again.

Re: Recovering previous versions of documents

Posted: Mon Mar 06, 2017 7:11 pm
by affuller
OpenOffice no longer features the train mentioned in an earlier post-- 'Tools - Option - Load/Save - General - Save' menu item. Can anyone update this info?


The Openoffice can create 1 backup file for each active document into the Backup directory - after you set the "Allways create a backup copy" option at the 'Tools - Option - Load/Save - General - Save' menu item. But it will overwrited at every time when you click on the Save icon.

Re: Recovering previous versions of documents

Posted: Mon Mar 06, 2017 7:38 pm
by RoryOF
Options is under Preferences on a Mac. OO only saves the last version when "Always create a backup copy" is checked, not all previous versions.

Re: Recovering previous versions of documents

Posted: Mon Mar 06, 2017 8:31 pm
by affuller
Thanks a million!

Re: Recovering previous versions of documents

Posted: Mon Mar 06, 2017 8:31 pm
by John_Ha
See also [Tutorial] How to find and un-delete Writer temporary files for instructions on how to identify and un-delete the temporary files Writer wrote while you were editing the file, and then deleted.

Re: Recovering previous versions of documents

Posted: Tue Mar 07, 2017 8:04 am
by charlie.it
Ciao, perhaps can help you (for the future) this incremental backup extension: viewtopic.php?f=47&t=77024.

Also, on your Mac, did you not enabled Time Machine?

Re: Recovering previous versions of documents

Posted: Mon Jul 09, 2018 5:04 pm
by Alain Reve
If you are using Ubuntu, there is a program called "forensic" which may help to retrieve old temporary files created by OO.

Re: Recovering previous versions of documents

Posted: Mon Jul 09, 2018 6:21 pm
by John_Ha
See [Tutorial] How to find and un-delete Writer temporary files for

a) detailed instructions on how to recover a file as it was when last opened or saved, or as it was when it was last saved with AutoRecovery;

b) how to find previous versions of the file in the folder it is located in, but which have since been deleted;

c) how to un-delete the temporary files Writer wrote while the file was being edited, and then deleted. This will recover the file as it was when last opened or last saved, and is probably the most hopeful.