Just lost 4k words. Backup? Recovery? Seppuku?

Preemptively: I am aware that this is entirely, 100% my fault. That does not quell the panic. This is my attempt at being coherent despite the part of me that’s wailing “BUT I NEEDED THOSE WORDS.”

Deep breaths. Okay.

I wrote approximately 3,000 words in this Scrivener session, separated between 3-4 documents (within the same folder, within the same project). I was trying to hit ctrl+comma to see my progress on my daily target and hit ctrl+m (merge) by mistake. Dark room, unfamiliar keyboard. I didn’t see that it had merged the files, so I again tried to hit ctrl+comma, and again hit ctrl+m by mistake. I noticed that it had merged the files together and I panicked. I pressed a button. I think it was “undo,” but I don’t actually remember. Maybe I right-clicked so I could “split” it back into separate documents? I don’t remember. Either way, I apparently did not manage to hit the button I was attempting to hit, because it did not “undo” and it did not “split.” (God, I know I’m being unhelpful, but it’s 2am and I’m fighting down an anxiety attack. Please be patient with me). The whole merged text disappeared. All four thousand words. Everything I wrote today, plus the most recent document from yesterday (which I’m assuming it merged into when my clumsy fingers kept hitting M instead of comma).

It isn’t in my trash. It isn’t on my clipboard. It does not appear to be located elsewhere within the project. I searched for a word that I knew I’d used exclusively in that chapter, and the search said that word wasn’t used anywhere in the document. I haven’t altered any backup settings, so it should be set to whatever the default is. I know it saves every two seconds, but that doesn’t help with recovery, since it saves over itself.

Tried going to the documents before and after the missing files and clicking “Undo” – didn’t bring it back. Tried doing the same with the parent folder – again, nothing. Tried clicking the “back” button on the header bar – it took me to the file that had held the whole merged text, but it was empty.

What am I missing? Is there any backup option that would let me get at that text again? I don’t have any snapshots – I just wrote it tonight. I haven’t closed the program yet, for fear that the backup option would only be viable within the session.

Please tell me there’s some way to get those words back.

Good, don’t close the project. Go back to the document that had the merged text (which is empty) and hit Ctrl-Y (Redo).

This is a known bug, though a very nasty one, and I’m very sorry you got hit. Even if you’ve clicked in other documents and so on, you should be able to still redo and get your text back in there.

(The bug is what you suspected–merging documents, then focusing in the editor and hitting Ctrl-Z for undo. Hence Ctrl-Y, redo, should bring it back, if you don’t close the project and so delete the undo stack.)

Both “redo” and “undo” are greyed out in the menu now. They weren’t before. I clicked on each of the files within the project to make sure the text hadn’t been added to one of the others. It hadn’t. I pasted what was on my clipboard into the newly-empty file because I thought it might have somehow copied the whole thing to my clipboard. Assuming that’s why “redo” isn’t an option (although “undo” should be, shouldn’t it? That’s counter-intuitive).

Is it gone for good, then?

Edit: My mistake. I hadn’t clicked within the editor field: “redo” and “undo” are NOT greyed out. But clicking “redo” does nothing, presumably because what was on the clipboard killed the “redo” option when I pasted it.

This has never happened to me before.

We should be able to recover the missing text that was written prior to this session, even if you don’t have a backup from then. Without closing the project, make a copy of its .scriv folder in Explorer (name it something clear, so you know it was made while the project was open and in a bad state). It’s going to be a little ugly, but the text will be saved within an indexes file inside the project and we can cut it out from there to restore it. Plain-text, but at least it will be your words.

That file only gets updated when the project is opened, however, so any text you wrote in this session won’t be there. If you have Windows set up for automatically making system restore points, we might be able to retrieve file versions from that (Win7 does file versioning; I don’t know what system you’re on), but that’s kind of a long shot. I’m racking my brain for other options, but I’m very afraid that may be it. Scrivener automatically backs up the binder structure and data associated with that which is “Scrivener-only”, but not the documents themselves, so there won’t be another copy of those unless you’ve backed up or copied the project at some point.

I am so incredibly sorry. I know that’s not at all what you wanted to hear.

Just searched my entire system for a name that was only used in those files – no results found, even in hidden files, etc. I’m thinking it’s completely gone.

I already made a copy of the whole project folder and contents, for fear of making another muddle of things. Glad to know I can at least get the first thousand words back from that.

Thanks so much for your quick help. I think I’m going to bury myself in another can of caffeinated soda and try to rewrite most of it while it’s still (somewhat) fresh in my mind.

All power to you. I lost the second half of a story due to a network glitch (and my own stupidity in how I was transferring the file, I admit it) and spent the rest of the night, and most of the following week, not being nearly as productive as you aim to be. I know how absolutely sick it feels and again, I am truly sorry.

Not that its any help now, but use the snapshot feature early and often, and same with File>Backup Project To… You can always delete extraneous backups/snapshots later if you go overboard.

To get your text out of the search file, you’ll need to open the search.indexes file from the copy of the project made while the project was still open. (The file gets updated when you close the project–I said that wrong in the earlier post–so you want to get at it before Scrivener’s gone through its project-close process.) You’ll need to right-click and choose Open With, but it’s just an xml file and you can open it in WordPad or the like. Search for an identifying phrase then to jump to the right location and then you can copy out the text and paste it back into Scrivener. You’ll probably need to clean it up a bit, but that should be relatively trivial once you’ve got it.

Edit: Oh, I didn’t answer the other question about undo/redo. It has to do with how the stacks work–individual for each document and different action types, just how the programming architecture works If you don’t edit the document at all, then after the initial undo that deletes the text after the merge, redo will restore it, and that holds even if you click other documents. But once you edit the document, as unfortunately happened here with the paste, then there’s no redo until you undo again, and then of course it doesn’t redo the right thing since it redoes the new undo.