Backup fails for sign out

When signing out, Scrivener presents the following screen:

“Scrivener is set to back up on project close but the backup could not be created. This could be because the backup location is inaccessible or there is insufficient space. Automatic backup preferences can be adjusted in Options or Project Settings. Continue closing without backing up?”

Steps to reproduce:

  • Press Ctrl + Alt + Del
  • Click Sign Out
  • The Prompt should appear

Are you backing up to a cloud location? If so, that could be the cause.

When you press Ctrl-Alt-Del and tell Windows to shut down/sign out, it starts with the user processes in order of their shutdown level, an integer between 0 and 1023, with the default being 640 (most applications use the default). If the process servicing the cloud location gets shut down before Scrivener, the cloud location may not be available for saving the backup.

You will have much less trouble if you close your programs before signing out of your computer and expecting Windows to clean up after you.

No only local, no cloud backup configured.

Guys, this is a beta test, I know you shouldn’t do it like this, but Scrivener should be able to handle such user actions in a safe manner, especially when it’s about backups. Scrivener shouldn’t lose any data just because Windows is updating automatically and signing you out for example (this is how it occured for me the first time), these are edge cases that need to adressed.

How much data do you have in your project? Do you have a lot of large research materials imported in?

One thing you can do is manually back up your Scrivener project and time how long it takes. What Scrivener is actually doing is writing a copy of every data file in your project to a new location. If you have a large amount of data in your project, that is naturally going to take a certain amount of time – and that time will be longer if the working copy of your project and the backup copy are on the same disk (the OS has to alternate between reading and writing from the same source – if that source is a spinning platter disk drive you get the additional overhead of the read/write head having to swap back and forth between the various block locations, which takes far longer than the actual reads/writes themselves.) If you are performing a ZIP on your backup, then it also has to go through the backup files, add them to the ZIP, and clean up after itself. All of this takes a certain amount of time dictated by physics and the underlying OS.

Windows only gives processes a certain amount of time to respond to the shutdown signal. If the time your project backup takes is longer than that window…WIndows will terminate Scrivener before it completes the backup.

Note that this can happen even on smaller projects, if you have a number of processes that are all being shut down at once and contending for disk access at the same time (such as writing logs, writing events to the Event Viewer, etc.)

The best practice for Scrivener is to shut your projects down when you are done working, not just leave it open. They even include a setting where Scrivener will automatically shut itself down after a certain period of inactivity. They also provide ways to reference external documents in your project Binder without including those files in your project folder, which is perfect for reducing project/backups size (and thus time) – files that are large reference files that you’re not going to be editing from Scrivener are a perfect candidate for linking like this (video files, PDFs, etc.)

Scrivener tries to be smart, but it can’t override the OS and it can’t handle every edge case directly. Programs and users still have to work within the parameters defined by the laws of physics and the operating system.

Agree that it is best practice to close everything before shutdown. There are certain conditions, like unsaved documents, that prevent Windows from shutting down (unless you press Shutdown Anyway). I’ve not done Windows programming for a long while, but I’d imagine that Scrivener’s backup process could be protected from termination in a similar way…