One more way to recover overwritten files

Just popping in to post a solution to an overwrite-problem in the hope that it may help others.

So I did something stupid today: I changed a project name with the project open and subsequently allowed Scrivener to overwrite a new version of my project with an older version. 3500 words lost. I had manually copied the project to a dropbox folder just before changing the file name, so I felt safe, but somehow dropbox didn’t actually replace the older file with the same name (the latest rtf files in the project and the entire version histories of other dropbox backups were at least two days old). I had Scrivener backups, but somehow they also only offered a two-day-old version. None of the solutions found by searching online worked. Still, I did, in the end, manage to recover all my work. Here’s how:

– With Scrivener closed, I searched (via Finder) for a particular term I knew occurred only in the part that was lost. Finder found the term, so I knew the part that was lost was still available somewhere.
– Without opening Scrivener, I looked inside one of the .scrivx files (“Show package contents”) and checked the rtfs. I had already done this, but consistently only found files with a “modified” date of two days ago, consistent with the content of the old files (i.e. where I was at the time). This was still true. Searching within the folder didn’t work. So I had to comb through the different files manually.
– The lost work turned up to be preserved not in any of the rtf files, but in the search.indexes file (in the Files folder within the project). Apparently while everything else had been overwritten, the search index had been preserved. Changing the file extension to txt allowed me to open it in TextEdit (you can also use any other word processor), and from there, I could copy my latest work back to Scrivener. This file also contained all the notes and comments somewhere (the entire thing was very large, 1.8MB and over 250.000 words). The only thing I had to do was: put the comments and footnotes back in place, and restore any markup (italics, bold etc.).

Hope this helps someone!

N.

Yay! Glad to hear you were able to recover your work.

Yes, renaming a project with it open is probably a bad idea.

Remember that you can take an additional backup at any time with the File -> Backup -> Backup Now command. That’s a good idea whenever you’re doing any kind of major editing or rearrangement.

You might want to take a look at the Scrivener -> Preferences -> Backups pane to make sure the options match the way you work. If the last backup was two days old, there might be a mismatch there.

Katherine

By default, Scrivener is set to take backups when you close it. Are you leaving it open for days at a time? That’s what it sounds like. If so, that’s why the backup was two days old. That would be a good habit to break. I shut Scrivener down at the close of every writing session, to ensure that all the files are closed in case I later want to access from iPad or iPhone, but also to ensure that I have a backup. Or, as Katherine suggested, take an additional backup at any time with the File → Backup → Backup Now command.

I highly recommend following Katherine’s advice about taking a look at – and understanding – your backup preferences. Your recovery would have been much simpler and shorter if you had a more recent backup.

But congratulations for dodging a bullet!
Jim

Yes, you’re both completely right – I used to leave Scrivener open for days at a time, and this is why the Scrivener backup was of little use. I thought I was safe with the manual offsite backups, which I’d make at the end of every writing session (and right before I renamed the file), but obviously not. Leaving the file open while renaming it was the other stupid mistake, and then failing to err on the side of caution by not creating a copy in response to the error message…

All in all, not my proudest moment, and I’ve now built in some measures to prevent a similar problem in the future. But I thought the desperate but ultimately effective solution might at some point help others who end up making a similar series of bad decisions :slight_smile: