Restoring from dropbox versions?

Hi,

TLDR: Where in the Scrivener file package can I find the actual text written in the main document? I need this because I have lost some work and I cannot restore an old version of the whole Scrivener package from Dropbox (for reasons explained below).

I am new to Scrivener and like it so far, but yesterday I seemed to have against all odds encountered a data loss. I have tried restoring both from Dropbox and Time Machine backups, as well as Scrivener backups, but somehow some text has been lost. This has been a frightening experience and makes me reluctant to dare to use Scrivener anymore.

I have tracked down the Scrivener package I think that contains the last version that had the lost text, it is in my dropbox.
The problem is that I cannot restore a previous version in dropbox for that package. The reason I suspect is that I in my panic of searching for the lost text I moved the Scrivener package (which was versioned in Dropbox) to another directory.
Thus Dropbox treated it as deleted. I have since recovered the file, but I cannot get a versioning of the Scrivener package. I can however go into the package in dropbox, and find versioned files and directories within the package. The problem now is that I don’t know how to find the text within all the Scrivener files. I can do a restore version of the .scrivx file but that does not do any good as the text is stored elsewhere.

If I only could find the text within the Scrivener files I would find my missing text, but I have searched the board and google for where the text is actually stored within Scrivener, but I cannot find it. Can anyone help me where to look?

Welcome to Scrivener and its forums, Perwiz.

Sorry to hear about your problems. It’s not a good idea, except in extreme circumstances, to go searching within your project folder for the text that you’ve lost. That could make it difficult for you to launch your project subsequently. Are you sure that at least one of Scrivener’s backups (as set in Scrivener > Preferences > Backup, and, hopefully, zipped up) doesn’t contain your text?

If it’s any reassurance, in more than ten years’ intensive use of the application, possibly I’ve been lucky but I’ve never lost anything.

One of the appendices to the manual explains the project format.

I concur with Hugh’s recommendation that you inspect your backups first. It’s technically possible to recover the individual component files, but that’s definitely a last resort.

Katherine

Hi,

Thanks for answers, but as I tried to explain I have already looked in all backups files normally stored by Scrivener. I had it set to make a backup at exit, and keep 5 latest. However, in the process of desperately searching for my lost text I guess I opened the files too many times so that the backup was overwritten.

Dropbox saves versions of files, and I have also unzipped all dropbox versions and looked in these, but cannot find the missing text.Hence, the text is not saved in any of the Scrivener backups.

The only chance I can see to find the text is to go back in the dropbox versions of the Scrivener packages. However, versioning is not available from packages it seems in Dropbox. (I initially thought it was because I had moved files around in Dropbox, but looking again I see that even normal Scrivener packages is not available to go back in versions). Thus, I need the Scrivener file system, in order to go back in versions in Dropbox, but I do not know where to start.

I looked in the manual appendix but cannot find anything about how the data is stored within Scrivener file package. I would appreciate if someone could point me to where to find documentation about how Scrivener stores text within the packages.

I’d stress that you should make a zipped copy of the original restored project on Dropbox before doing this. It should be a safe procedure, but it’s always a good idea to do so before messing with the internal contents of a project.

Dropbox considers folders ending in .scriv to be a “package” that unlike on a Mac you can’t examine and work with as files, so you can get past that limitation by taking the “.scriv” off of the folder name. Normally you could just do this on the Mac, but since you want to access Dropbox’s versioning feature you’ll need to use the website.

With the folder renamed you should now be able to navigate into it normally. Drill down into the Files folder and look for something called “search.indexes”. Open that as a text file and search for the name of the document in the binder that has the text that is missing. Mainly all you are looking for here is the long random string of letters and numbers found within the “ID” attribute of the enclosing “Document” element. In case you aren’t familiar with XML, here is an example: if you’re looking for a document called “Notes on Taxidermy”, then you would find something like this somewhere in the file:

<Document ID="D5F885A9-ABD1-46F8-88A4-19AE3359574A"> <Title>Notes on Taxidermy</Title> <Text>Blah blah...</Text>

The “D5F885A9-ABD1-46F8-88A4-19AE3359574A” is the part you want to take note of. Though you might as well scan the Text field here and see if your text is in this location. Depending on how the data loss occurred, it might be that the search index still has it in plain-text form.

But assuming it does not, the next place to go is the “Data” subfolder, where you will find a folder named by this random string you found. Within that, the “content.rtf” file is what you want to check for versions in Dropbox.

When you’re done, rename the main project folder back to having “.scriv” on the end, let the changes sync down, and try opening the project. If all is well, then you can replace your current working copy with this one.

Since the data was restored from outside of Scrivener, use the File ▸ Save and Rebuild Search Indexes command, by holding down the Option key on the File menu.

Brilliant! I found the text in the file you suggested. I then tried to search for the file and also found the text there, saved. I think most, if not all of the missing text was there!

At the dropbox website I could go into the Scrivener package without changing name, so that step was probably unnecessary. In fact, I just noticed that Dropbox does not make history versions of whole directories, but only on files. This was why I needed the information which file to look in, to search for the missing text, and that you so kindly helped me with. I am very grateful!

Many thanks! Now I can confidently continue to use Scrivener for even bigger projects! It feels good to know that Dropbox saves versions of the files (at least 30 days I think), but I will complement this with a Time Machine backup.

I probably spent more time trying to find the missing text than it took to write it, but it was such a shock to loose it. And now I know where to look if it ever happens again.

Again, million thanks for finding the solution!!!

Hi perwiz,

I’m happy that you were able to find & restore your missing words. :slight_smile:

Now that you’ve recently had a good scare, this would be the perfect time to urge you to get Scrivener’s zipped backup system properly configured.

Your Scrivener zipped backups should be your first line of defense against Scrivener data loss, not DropBox or Time Machine, because restoring a project from a zipped backup is more efficient and safer than either of those.

Scrivener’s built-in backup system is excellent, but–unfortunately–the default setting of “Retain backup files = 5” leaves a lot to be desired, as you’ve just discovered.

Have a look at this post I wrote for another user, which explains the various backup settings and my recommendations for each:

[url]Label Colours Not Working - #5 by JimRac]

Once you’ve got Scrivener’s backups properly configured, you can rely on your zipped backups for restoration issues related specifically to Scrivener. You should never have to go digging around in DropBox again, and the only reason you might need to go back to Time Machine is if you had some catastrophic system failure, like a hard drive loss.

Let me know if you have any questions.
Jim

I second Jim’s comments here, though I will say that time machine can be very helpful when sorting through your backups. If your produce fewer Scrivener backups per week than what you have Scrivener set to keep, and if you allow Time Machine to run every day, then you’ll always be able to get to any backup, as far back as Time machine keeps your data. For my setup, that’s about 3 years.