Sunday, January 6, 2013
Triage! Recovering Scrivener Files From Dropbox or Google Drive Errors
A while back I did a comparison of Google Drive and Dropbox, and briefly discussed the issues you can run into with Scrivener, the writer's fancy-pants friend. I didn't really focus on Scrivener because I was comparing cloud storage solutions (and I really should take a look at SkyDrive sometime I suppose, now that I'm running Windows 8).
Anyway, reader Chaim recently got in touch with me to ask for help. He was using Scrivener with Google Drive, and somehow his work across two computers got out of sync. The result? Lost work.
I've had the same thing happen to me more than once working with Scrivener on Dropbox. It's a problem that afflicts anyone using Scrivener with either cloud product. And it sucks. Simply put, you must make sure that you've closed out of Scrivener and let your project sync to the cloud before you open it on any other computer. Period. If you don't, your project file will get screwed up and you will appear to lose work.
I say appear because, hey! All is not lost. And I'm here to walk you through getting your files back.
Step 1: First, copy your Scrivener project out of your cloud storage and onto another location on your local computer. This is like isolating a crime scene, or quarantining a patient: you don't want Dropbox or Google Drive to do any more futzing with your files while you're trying to recover your writing. Scrivener stores projects in a folder with the .scriv extension (on Macs this will look like a file, but trust me, it's a folder). This is what you need to copy somewhere - your Desktop will work just fine.
Step 2: Next you need to open the .scriv folder and take a look at its ooey-gooey contents. On Windows this just means opening the folder. On a Mac, you'll need to change the folder name and get rid of the .scriv extension, so the operating system will know to treat it as a folder instead of a file.
Either way, once you're inside the folder you want to look for the Files folder. Open that, then open the Docs folder inside it. You'll be greet with a big old list of numbered RTF files. (RTF is like a Word document's handicapped cousin.) These are where Scrivener stores all of your writing... and odds are that writing you "lost" is still there, even if Scrivener can't see it.*
Open up the RTFs, one by one, and look for your lost writing. If one of the RTFs is labeled "conflicted" or otherwise numbered oddly, that's probably the one with the missing text. Once you've found it, open up your original Scrivener project (the one that's still in your cloud storage folder) and paste the missing text in. Voila, done! This is what worked for Chaim, and hopefully it worked for you too. If not, move on to Step 3.
Step 3: Is your text not in the RTFs? Then it's time to check your patient history... I mean backups. One handy feature of Scrivener is that it automatically backs up the last five copies of your project file for you, by default. The problem is that it can be hard to find out where Scrivener is storing the backups if you just go looking for them. Fortunately, Scrivener has made this easy for you.
Open your project and select the "Tools" dropdown at the top menu, then "Options...". Click the "Backup" tab in the window that opens up. Along with some other options, you'll see your backup location and a button that says "Open backup folder...". Press the button and voila! Backups.
Now, with any luck you'll see a ZIP file named after your project. Copy the most recent one to a convenient location and unzip it. Then, open the unzipped project in Scrivener and look for your lost text. If all is well, you'll see it. If not, you'll want to go to Step 4.
Step 4: At this point your lost work isn't in your current project or your backups, and it's time to get serious. Get out your scalpel, fire up your web browser and browse to your cloud storage solution's website. We're going to check your version control system.
What's version control? Basically, when you save changes to a file to the cloud, Google Drive and Dropbox will both keep the previous version of the file for 30 days (by default; you can pay to extend this to life). If you make an error ("Whoops! I deleted 3,000 words and hit the Save button by accident!"), you can pull up the previous version and recover your work. The details vary between Google Drive and Dropbox, so look them up in their respective manuals.
What if you don't save that often? Well, Scrivener is your friend here too. It has an auto-save feature that fires off every two seconds, to keep your work up to date. If you're editing your project while you're hooked up to the cloud (i.e. you have an Internet connection), you're fine. If not, well... maybe go back to Step 2 and take another look?
Hopefully by this point you've got your work back (voila!), so let's consider leading a healthy lifestyle for a moment, and move back to...
Step 5: Backups. As nice as Scrivener's default backup configuration is, you can and should be able to do better, especially if you're using cloud storage already.
Open up the Backup window again and take a look at the options. First, make sure "Turn on automatic backup" is checked! Then, tell Scrivener when to back up your work. I use "Backup on project close", but if you're paranoid you can select "Backup with each manual save". I also like to compress my backups into ZIP files and add the date to backup file names, just in case I need an easy time stamp reference to some colossal revision effort.
Finally, there's the big two options I recommend. First, for the "Retain backup files:" option, I recommend keeping ALL of your backups in perpetuity. For modern computers the space cost isn't going to be a big deal, and you might be grateful for the option to look back at your work months later (say, if you want to harvest a discarded character for some new project).
Second, create a folder in your Dropbox or Google Drive for your Scrivener backups, and change your "Backup location:" option to point to that folder. You should only have to do this once, although if you work on both Mac and Windows computers, you will have to do it twice. I'd also recommend using a separate backup folder for Windows and Mac under those circumstances. I don't know that the different operating systems will clobber each other, but I also don't like to take chances.
Once more, voila! You now have a Scrivener configuration that will silently back up all of your work to a separate folder, time stamp every backup, and upload them to the cloud one by one. Your work should have a long and healthy life - but maybe hook an automated backup drive to one of your computers, too. Just in case.
Hopefully you've found this useful. If you've got any other tips on how to keep your writing safe, post a comment and share!
*The dirty details: Scrivener uses a .scrivx project file to tell it which RTFs contain what text. If your .scrivx folder gets screwed up during a cloud storage sync, Scrivener won't be able to "see" the file, even though the actual RTF is probably still there. As far as I can tell this is the most common file syncing error that Scrivener runs into.