2

I am writing both my PhD manuscript and a scientific paper.

Instead of writing the latter in Overleaf, I chose to do it on my TexStudio. I made a huge mistake of copy/paste the template of the paper to the second chapter (that took me three months to write), saved, closed the file and went to sleep. This morning I realized what I did... Is there any way I can recover my chapter PLEASE??

10
  • 3
    Which operating system? In Windows, look into the Recycle Bin. You really don't have any backups for a 3-months project?
    – harrymc
    Commented Jun 3, 2023 at 15:48
  • @harrymc Windows, yes. I did not delete it... I always saved, I never thought of copy/paste the folder somewhere else just in case
    – Wallflower
    Commented Jun 3, 2023 at 15:50
  • 1
    @Wallflower In the future make sure you keep backups and use Github to version control, I use it for my PhD, papers etc baalkikhaal.github.io/2020/06/20/…
    – JamesT
    Commented Jun 3, 2023 at 15:57
  • System Restore does not do documents. Don't ! I'm writing an answer.
    – harrymc
    Commented Jun 3, 2023 at 15:58
  • 2
    It's 2023, and people still don't back up important documents...
    – RonJohn
    Commented Jun 4, 2023 at 1:40

3 Answers 3

4

You have a few options:

  • TexStudio may have cached history and allows going back before the fateful save and exit
  • Data recovery on the drive can find the bits of the previous chapter that were not overwritten by the new data
  • Your computer has cloud sync/backup software (such as OneDrive or Google Drive or iCloud) and you were working in a directory that is protected by this

I am not familiar with TexStudio and you mention it is an old version. If file/edit history is cached this will be documented and will be an option or tool within this program.

Data recovery requires several things: YOU have written anything else to the disk since overwriting this file, the OS hasn't written anything else to the disk since, recovery software can find the bits on the disk that previously belonged to the file, and none of the myriad other factors impacting this work against you.

Hopefully you have a cloud backup/sync tool actively running on your system, as this is the method most likely to work best. Going forward, you should definitely have such a tool going forward, if you do not have one currently. If you DO have such a tool running, you will need to look up how to use it to restore to a previous file version.

3

Don't use the disk while you're trying to recover it! Writing to the disk may overwrite your data.

Methods for recovering deleted files :

  • Search the Recycle Bin for files with names identical or similar to the deleted file
  • Restore from Control Panel > File History (if turned on)
  • Restore previous version of the file by in Explorer, navigate to the file, right-click and select "Restore previous versions" (if enabled)
  • Try Windows File Recovery
  • Use a deleted files recovery product :
7
  • The file was overwritten not deleted. I tried the third options, I have no previous version :'(
    – Wallflower
    Commented Jun 3, 2023 at 16:11
  • Those options also don't work for me, because I haven't turned them on. Don't give up - continue with the other options.
    – harrymc
    Commented Jun 3, 2023 at 16:12
  • 1
    When you say it was "overwritten not deleted" that's not technically true. Any safe filesystem would write a new version of the file, then once confirmed the write was successful, swap the pointers to the new location. The old file is still actually there on the drive, just not marked as in use. Your chances of finding it again with recovery software increase on a spinny rust rather than SSD & also if the drive is not encrypted. If it's both SSD & encrypted, then you can probably give up now. Next time, keep backups. Any data not stored in at least 3 locations should be considered temporary.
    – Tetsujin
    Commented Jun 3, 2023 at 16:32
  • 1
    @Tetsujin, I don't believe that to be true. I see now reason why a file system can not use the same clusters as those already allocated to the file. If for whatever write fails it can then allocate different clusters. It seems mainly dependent on application. I edited RTF file using LibreOffice > It first saved new copy then deleted original. So written to new location. If I edit using WordPad, it saves in place. If I then examine MFT, file occupies original clusters. But in itself file system has no problem using same clusters and thus overwriting original version. Commented Jun 4, 2023 at 1:12
  • For ref some good info here superuser.com/questions/1397186/… Commented Jun 4, 2023 at 1:25
-2

I hope you have luck, but if you have a SSD drive, it may not be possible to recover the old file data even if it's not overwritten by the new version because Windows might have overwritten the old data using TRIM commands:

It’s not possible to recover deleted data from TRIM enabled SSDs. This is because when an SSD erases data with the TRIM feature enabled the data being deleted is immediately overwritten permanently.

https://www.dataclinic.co.uk/data-recovery-and-the-ssd-trim-feature

For your personal backup, in addition to GIT, I think you should buy an external HDD, keep it plugged to an USB port and enable the Windows File History to take a snapshot every 10 minutes of any changes to your important files.

https://www.computerworld.com/article/3658132/how-to-use-file-history-windows-10-windows-11.html

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 4, 2023 at 1:25
  • 1
    That's not what TRIM is or does, your reference is wrong. Maybe they tried to simplify things, but as it's written it is incorrect. Commented Jun 4, 2023 at 1:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .