Forums

Lost content of files

I'm using a small script that it's scheduled to run daily, and all it does is to scrape a site and collect the data into some CSV files. Usually, this task takes about 2300 seconds. Only this evening I observed that in the last 4 days the script only took about 20 seconds to run. After a better check, it seems that the csv files, which also contained some links that had to be scraped, are empty - so 15 months worth of data are gone. I must say that I haven't done any modification to my script lately. Do you guys have any idea what could have happened, and also, is there any chance of recovering the lost data?

If your script keeps files open for the entire time, then an interruption can cause your files to be destroyed. It's generally a bad idea to keep files open across a long-running process.

I understand... Yeah, that might have been the issue. So I suppose that in this case the file is lost. It might sound like a dumb question, but do you guys happen to have any tool for bringing a file back to a state that existed before breaking the file?

First: If you care about something, back it up!

But: We don't normally do it, but we do have backups that we keep for recovering if our servers have a problem and we can (with great effort) recover user files from them. What files do you need to be recovered? And when were they emptied?

The last time when the script ran properly was on 8th of April. Is it safe to tell you the name of the files here, in the forum, or should we find another way of doing this?

It's probably not an issue, unless your filenames contain proprietary information, but if you're feeling nervous about it, send us feedback.

Just sent a feedback.