Deleted Files

277 views
Skip to first unread message

Ali ElGabri

unread,
Feb 27, 2016, 12:13:25 PM2/27/16
to Racket Users
I recently (yesterday) finished up a somewhat large project that added up to almost 2300 lines of code. It was all in racket using the Dr.Racket IDE. I saved up the project, closed my laptop, and went on with my day. Later on, I opened my laptop, added a few things to the project, did not save, and closed the lid on my laptop. Put in hibernation mode.

I open up my laptop again to actually submit the assignment because it was due that night and find that it had shut down. I don't know why it shut down because I certainly did not shut it down... maybe low on battery. I open it up, login and everything, and I find Dr. Racket telling me that it has my project that I could recover. I was like sweet, clicked the button, and then it gave me an error saying that it could not find my project.

Skip to after 30 minutes of searching desperately for my project.. I ascertained its disappearance. It was just totally gone... 100%. Just.. poof.

I am asking for some sort of explanation. Maybe not so much a solution because I know those are just... not possible most likely. But I want to know if any of you guys know how it could have just dissappeared. I checked the recycling bin, tmp files, I checked the folder it had been in and every other folder in my laptop to be honest. Just.. poof.

Neil Van Dyke

unread,
Feb 27, 2016, 1:00:26 PM2/27/16
to Ali ElGabri, Racket Users
I'm sorry to hear about your project, but all might not be lost.

If you haven't already, you can try deleted file recovery, since the
file(s) contents may be still intact on your disk, and merely unlinked
from their directory entries. The sooner you try to recover, before
further writing to the disk, the better. If you have use of a second
drive (that you can erase), and ideally a second (Linux) computer, you
can make a raw image of the disk with the lost files, and then recover
them at your leisure without risk of further writes to the disk
overwriting the blocks of your file.

I do see a `recover-file` procedure in
"gui-lib/framework/private/autosave.rkt", which is deleting files that
it thinks it no longer needs. Maybe it should be renaming the files
instead of deleting, since already something has gone wrong, and data is
at stake. I don't know whether this is the recovery operation you saw,
but this is plausible evidence that the dog did eat your homework, if
you need to talk with a teacher or coworkers about time to reconstruct
lost work.

Proactively, in the future, it's easy to forget while immersed in a
project, but we have to try to remember to do frequent backups,
especially when in a project crunch. This can means periodically
checking in to an SCM system like Git, emailing the files to yourself,
copying the files on the same disk ("myfile.c.backup-1",
"myfile.c.backup-2") perhaps in a different directory, copying to a
second disk on the laptop, copying to a removable USB drive you store
physically separate from laptop (not to get stolen with same bag as
laptop), doing a normal full machine backup, etc.

Again, sorry to hear about your project, but I hope file recovery
works. If it's any consolation, I think most people lose files in life,
at one time or another, and some of us (including me) have done it in a
much more spectacular and costly fashion than you might have, this time.

Neil V.

Robby Findler

unread,
Feb 27, 2016, 3:47:24 PM2/27/16
to Ali ElGabri, Racket Users
DrRacket saves "auto save" files every 30 or so seconds and they will be in the same directory where the file was saved. (They are deleted after the file is saved successfully.) do you see any strangely named files in the directory where your project was?

Also there may be a bug in drracket and the exact content of that "could not find" message you refer to may contain a clue to the bug (and possibly a clue about what happened to your file). Do you still have its text?

And I too am very sorry to hear about your project. 

Robby
--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ali ElGabri

unread,
Feb 27, 2016, 3:54:51 PM2/27/16
to Racket Users, ali.e...@gmail.com
Hey Neil,
Thank you very much for commenting. I do appreciate it. I am running a recovery file now... it will take ten hours, so I will have it running in the background while I finish my project now because the professor gave me a one day extension. I hope I do find it, but I am glad I understand why it happened now. That was eating away at me.

Ali ElGabri

unread,
Feb 27, 2016, 3:57:01 PM2/27/16
to Racket Users
Hey Robby,
Unforunately, I do not have the text. All it said, however, was that it could not locate the file file.rkt in C://file.rkt

On Saturday, February 27, 2016 at 3:47:24 PM UTC-5, Robby Findler wrote:
> DrRacket saves "auto save" files every 30 or so seconds and they will be in the same directory where the file was saved. (They are deleted after the file is saved successfully.) do you see any strangely named files in the directory where your project was?
>
>
> Also there may be a bug in drracket and the exact content of that "could not find" message you refer to may contain a clue to the bug (and possibly a clue about what happened to your file). Do you still have its text?
>
>
> And I too am very sorry to hear about your project. 
>
>
> Robby
>
> On Saturday, February 27, 2016, Ali ElGabri <ali.e...@gmail.com> wrote:
> I recently (yesterday) finished up a somewhat large project that added up to almost 2300 lines of code. It was all in racket using the Dr.Racket IDE. I saved up the project, closed my laptop, and went on with my day. Later on, I opened my laptop, added a few things to the project, did not save, and closed the lid on my laptop. Put in hibernation mode.
>
>
>
> I open up my laptop again to actually submit the assignment because it was due that night and find that it had shut down. I don't know why it shut down because I certainly did not shut it down... maybe low on battery. I open it up, login and everything, and I find Dr. Racket telling me that it has my project that I could recover. I was like sweet, clicked the button, and then it gave me an error saying that it could not find my project.
>
>
>
> Skip to after 30 minutes of searching desperately for my project.. I ascertained its disappearance. It was just totally gone... 100%. Just.. poof.
>
>
>
> I am asking for some sort of explanation. Maybe not so much a solution because I know those are just... not possible most likely. But I want to know if any of you guys know how it could have just dissappeared. I checked the recycling bin, tmp files, I checked the folder it had been in and every other folder in my laptop to be honest. Just.. poof.
>
Hey Robby,

Robby Findler

unread,
Feb 27, 2016, 4:22:25 PM2/27/16
to Ali ElGabri, Racket Users
What is the output you see if you open a new tab, make sure the
language is set (via the "Choose Language" dialog) to "The Racket
Language", paste in the code below and hit "Run"?

Robby

#lang racket
(call-with-input-file
(build-path (find-system-path 'pref-dir)
(case (system-type)
[(unix) ".plt-autosave-toc.rktd"]
[else "PLT-autosave-toc.rktd"]))
read)

Ali ElGabri

unread,
Feb 28, 2016, 1:23:44 AM2/28/16
to Racket Users, ali.e...@gmail.com
Sorry for taking so long to respond... just finished redoing my project.
It just displays the files in one of my folders. I see some .bak files, and one of them IS a backup to the file that I lost, BUT it is an extremely outdated one.

Robby Findler

unread,
Feb 28, 2016, 7:39:28 AM2/28/16
to Ali ElGabri, Racket Users
Yeah, the .bak files are not the files I was hoping you would find.

Ah well, I'm very sorry you lost your work.

Robby
Reply all
Reply to author
Forward
0 new messages