[RESOLVED] Disaster: 7 weeks work lost

Are you positive that in the past week you have seen work you have done during that week? Sometimes I write forwards only and don’t really go back to what I’ve done in recent days, and may not notice things were not where I thought they should be. If you’ve definitely seen the work you’ve been doing, loading and closing the project as you have, then it must be somewhere, unless it was just a few moments ago thoroughly deleted by some process (you don’t happen to run any automation or system cleaning tools by any chance? If you do, do they have logs you can consult?).

All your other helps are very informative. And for now I’d like to find the last few weeks of RTFs. Is there anything like a temp workspace where Scrivener saves? (Like something in /var/folders/…?)

No, there is nothing as complicated as that going on. For a project to load successfully all of the data must be in the spot you see it, in Finder, and so long as the project is open, all saves go directly back into that spot. That’s under ideal conditions of course, if something has gone tragically haywire that may not happen, but if it doesn’t, there is no secondary place where that stuff would go. And to protect against that kind of failure, there are numerous safeguards that make sure saving is happening correctly. You ran into one of them—which may have been a false positive, but another is if the system reports a file cannot be saved. In that case it will shut down with a similar error and dump anything it hasn’t saved yet to the recovery folders you found. So that would handle cases where the disk you were working on suddenly lost power, or if it was loaded over NAS and the network went down, etc.

For it to actually not write anything that you are typing into the software, and not throw an error, basically Scrivener itself would have to be fooled into thinking everything is okay. That’s why I worried about larger problems, perhaps an overly full disk, or one that is need of disk repair—where things are so wrong with the system itself that it’s not even properly telling software that it can’t save what it just tried to save. There isn’t anything Scrivener can do about that, because it is misinformed at that point, into thinking everything is fine.

All your other helps are very informative. And for now I’d like to find the last few weeks of RTFs. Is there anything like a temp workspace where Scrivener saves? (Like something in /var/folders/…?)

Well one quicker test you could try is searching for phrases you’ve written recently. That may not always work though, given how Spotlight can be a bit touch and go when it comes to scouring package contents. I would run a positive test first, by searching for a phrase you know to be in the older project. If it, or one of its internal RTF files, comes back in Spotlight, then you should be good to go.

Failing that, you could run a “deep search” that bypasses Spotlight (which being an indexed search engine, can sometimes lose track of reality). It will likely take a long time to execute, but if the data is in your user folder somewhere, it should find it.

  1. In Finder use the Go ▸ Utilities command, and double-click the Terminal icon.

  2. Copy and paste the following command into the terminal window and press return:

    find ~ -type f -iname '*bak*zip' > ~/Desktop/potential_scrivener_backups.txt; find ~ -type d -name '*.scriv' > ~/Desktop/project_packages.txt
    

Like I say, you’re probably going to be waiting a while for that to run, as it will be physically hunting through every single folder and file name in your user folder, of which there may be hundreds of thousands. You will probably also see some permission errors, because Apple feels you shouldn’t have access to some areas of your user folder. These can be ignored—if you can’t search in there, you certainly can’t navigate into and save files there.

The commands will create two txt files on the Desktop:

  • potential_scrivener_backups.txt: these are .zip files that contain the letters “bak” somewhere within them. So there likely will be false positives in here, but the good stuff should be obvious given Scrivener’s easy to read naming scheme. This will detect cases where the you may have switched backup folders multiple times, or reset preferences and lost track of the motherlode.
  • project_packages.txt: any directory type item that ends in “.scriv” will be listed. That’s all it will be—project may be damaged or who knows what, but this will find everything under that criteria.

If there are hits in these files, they will contain lines of text where each line is a full system path to a file (or folder in the second case). This path can be copied and pasted into Finder’s Go/Go To Folder... menu command (even if the path is to a file, it will actually select that file for you as well as open the folder).

Now if you want, you could also run this command:

find / -type f -name '*bak*zip' > ~/Desktop/full-potential_scrivener_backups.txt; find / -type d -name '*.scriv' > ~/Desktop/full-project_packages.txt

The only difference here is that instead of searching your user folder, this will search everything, including all connected drives. Obviously that is going to take a really long time, so you might want to set that one up to run before you go out for errands or something. That will find projects absolutely anywhere, even if they somehow ended up getting accidentally saved inside of applications themselves (we’ve seen everything over the years). It will even hunt down places Finder isn’t “allowed” to navigate to without providing a direct path.

I would unplug the Time Machine drive before running that, if you choose to. That will greatly bloat how long it takes to run, but it will return a list of all backups and backed up projects too, so if you want to be more thorough leave it on. At that point I’d probably set this to run over night and make sure your energy saver settings keep the machine running.

2 Likes