Using Scrivener with Dropbox

Ki
KiwiChris
Posts: 2
Joined: Sun Jan 31, 2016 9:08 pm
Platform: Mac + Linux

Sun Jan 31, 2016 9:45 pm Post

I am very new to Scrivener - just starting to use a trial copy on Mac and briefly on Linux. Beautifully written program and tutorial, by the way :D - Posting this here because my problem resulted from my uninformed use of Dropbox.
Having set up a small project and imported files on Scrivener on Linux and synced my Documents folder from Linux to Dropbox I then opened Scrivener on the Mac, set up the basic project and attempted to open the synced project in Scrivener on my Mac. Unfortunately, because my file structure and syncing preferences are different on the two machines, the project got moved by Dropbox and when I went to exit Scrivener it stated that there was no project in that location so I couldn't save my work.
So I just wanted to note that, when exiting, if the project file has moved, Scrivener does not give one the option to cancel the exit (and correct the project location). Would that be an option worth adding?

User avatar
AmberV
Posts: 24131
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 04, 2016 12:07 am Post

Thanks giving Scrivener a trial! Given how things works internally here, shutting down is the safest blanket response to cover a variety of scenarios like this, no matter how theoretically safe a merge between what is loaded into RAM and what is on the disk may seem to be. By the way, when it shuts down in this fashion it should be writing any unsaved work to a recovery folder in ~/Documents. In most cases you’re going to do a better job of getting your data merged properly into one up-to-date result from that, than a deterministic algorithm ever could.

In more recent versions of OS X (10.10+ I believe), the operating system at the user level (dragging stuff around in Finder for example) can safely transport an open project and communicate to Scrivener where it has moved to (in older versions you definitely don’t want to do that). But Macs being in part a *NIX system, have processes and methods of moving things around that do not engage with that friendlier surface layer. It sounds like whatever Dropbox is doing falls under that class of file management.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

za
zazie
Posts: 2
Joined: Mon Apr 25, 2016 3:54 pm
Platform: Mac

Mon Apr 25, 2016 4:07 pm Post

I must be doing something wrong, but I really can't figure out what it is.
I just got a mac mini and I'm working on a scrivener project on both my macbook pro and my mac mini. My scrivener backpus go to a folder under my documents on my hard drive on both computers. And then I keep the .scriv draft on dropbox. Lately I've been working just on the mac mini, but when I opened the draft, through drobox, on my macbook pro, the older version of the draft opened -the one that I last worked on with the macbook pro. When I close this project and gets synched and then I open it on my mac mini, I get the version I was working on with the mac mini. It looks as though each computer was working on a different dropbox account... but they are not, it's the same one. Any help? Thanks!

User avatar
kewms
Posts: 5930
Joined: Fri Feb 02, 2007 5:22 pm
Platform: Mac

Mon Apr 25, 2016 4:51 pm Post

The most likely cause of this problem is a synchronization error: for whatever reason, the laptop, desktop, and Dropbox "cloud" have different versions of the project. There's a procedure for recovering from this kind of problem a few pages back in this thread:
viewtopic.php?f=2&t=11725&start=120#p149048

Katherine
Scrivener Support Team

za
zazie
Posts: 2
Joined: Mon Apr 25, 2016 3:54 pm
Platform: Mac

Tue Apr 26, 2016 2:14 pm Post

Worked like charm, thanks!

jg
jgould
Posts: 77
Joined: Tue Nov 23, 2010 3:16 pm
Platform: Mac + iOS
Location: Circleville, OH

Thu Jun 30, 2016 1:56 am Post

Ok,

So I'm slightly confused... The last thing I recall seeing was that one shouldn't store the .scriv bundle in the synced dropbox folder... Today I stumble across this blog post: http://www.literatureandlatte.com/blog/?p=713 which talks about setting up iOScriv to use the drop box folder.

Am I reading that it is in fact safe to store the whole bundle in the synced folder?

I've had the folder that I drop my zipped backup files syncing to dropbox for quite some time now, I will pull the backup down from the box if I've worked on the other machine.

Looking forward to iOScriv and finally being able to work on projects without having to dig my laptop out.

User avatar
xiamenese
Posts: 4270
Joined: Mon Jan 29, 2007 1:32 am
Platform: Mac
Location: London or Exeter, UK.

Thu Jun 30, 2016 8:16 am Post

Actually, I and many other users have been keeping our active project .scriv packages in Dropbox or Cubby so that we can work on them seamlessly between more than one machine and, in some of our cases, collaboratively with other people.

The absolute essential is to make sure that, when you finish editing one one machine, the project is closed and Dropbox or Cubby has finished sync'ing before you shut down or put the machine to sleep, and that it is fully sync'd on the other machine before you open it on that.

Ioa is ultra-cautious, I believe, and recommends using zipped back-ups for transferring projects via the cloud. However, Scrivener won't let you have a project open on two machines at the same time, so, as long as you are careful over sync'ing fully with the server, keeping the active project accessible to each of your machines works extremely well in my experience.

Mark
The Scrivenato sometimes known as Mr X.
iMac 27" (late 2015) 10.15.4, 24GB RAM, 512GB SSID
MBP17" (late 2011) 10.13.6, 16GB RAM, 2TB SSID
2017 iPad, iPadOS 13.3, 128GB, Apple Pencil
Scrivener, Scapple, Nisus Writer Pro, Bookends …

User avatar
AmberV
Posts: 24131
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Jun 30, 2016 9:51 pm Post

A long time ago, when people first started using Dropbox with Scrivener projects, an advisory cautioning against it was posted. As I recall this was before the problem was sufficiently understood—over time it became obvious that the technology was fine, the problem was how it was being used. Dropbox makes it easy to forget that there is networking lag while using it, the lag is just moved out of your view making it both more convenient and more risky at the same time. Out of sight out of mind, why not just close the lid on your laptop when you’re done? Well, because it was still saving and now if you switch machines you’ll be loading half-a-save. :)

I am ultra-cautious, but that’s mainly because I’m also a space cadet and know for a fact that I’m in that category of people that will routinely turn a project into scrambled eggs with sync technology (I was even damaging projects years before people hooked up sync to the Internet and started calling it “cloud”, I’m the hipster of piecemeal project destruction). So the technique I put together using the automatic backup system is not only for me, but for all of us who can’t be trusted with fancy things. ;)
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

jg
jgould
Posts: 77
Joined: Tue Nov 23, 2010 3:16 pm
Platform: Mac + iOS
Location: Circleville, OH

Fri Jul 01, 2016 12:01 am Post

Ok,

I understand now. I generally close projects when I am done with a computer, however I don't necessarily wait on the sync to finish. (or have network access when I am done with the computer) I'll just have to get into the habit of opening the laptop when I get somewhere with networking if I've worked on anything while I've been out...

de
derick
Posts: 435
Joined: Mon Aug 11, 2008 9:58 pm

Fri Jul 01, 2016 11:47 pm Post

Hi
I noticed on the blog post about syncing Scrivener for iOS ( https://www.literatureandlatte.com/blog/?p=713 ) the following:

"You are free to leave the project open on your Mac or Windows machine while you use and edit it on iOS. After you sync, the changes will be detected and incorporated into the project"

Is this syncing also coming to the Mac version, i.e. so that one can leave a project open on one Mac which editing it on another?
thanks
D

User avatar
AmberV
Posts: 24131
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat Jul 02, 2016 12:19 am Post

This is a special system set up for mobile syncing in general, it works by essentially maintaining two copies of the things you edit (and only those things), the original version and the version edited on mobile, which are merged together when syncing. The Mac and PC versions will continue editing and working directly with project data itself as they always have. This system would not be viable for the sort of thing you are asking about unfortunately. That is a much more complicated and certainly not on the table for any future releases.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

cy
cyf
Posts: 15
Joined: Mon Nov 23, 2009 10:12 am

Thu Jul 07, 2016 9:43 am Post

Does this mean that when synchronizing with the iOS version, one has to keep the project in the Scrivener folder in Dropbox on Mac (and PC) as well?

I have done that for a while already, because I work on two Macs, at home and in my studio, but I also keep having problems with alerts about the project being open on another computer, even though I very carefully quits Scrivener before leaving the Mac, and checking that Dropbox is up-to-date. I also keep getting "Recovered Files"-folders. I have never lost any text though...

Looking very much forward to the iOS version :-)

User avatar
AmberV
Posts: 24131
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Jul 07, 2016 10:40 am Post

I’d review the guidelines described in this article, if you’re experiencing problems like that. It sounds to me as though the project is rarely being fully saved or downloaded. As you say, given the nature of the technology, this is rarely going to lead to data loss. The problem is in fact the opposite, Dropbox stores conflicted files—files it cannot algorithmically determine to be newer—as duplicates. With Scrivener being designed to open something like “23.rtf” when you click on a particular item in the Binder, it is going to disregard a file called “23 (Conflicted copy from blah blah on such and such a date).rtf”. But the file is there, you can go in and pull these conflict files out and restore any text as needed. There are instructions for repairing projects damaged by sync in that same article I linked to above.

Does this mean that when synchronizing with the iOS version, one has to keep the project in the Scrivener folder in Dropbox on Mac (and PC) as well?


It’s a little more flexible than that, but yes that’s the basic idea if you want syncing. That is optional however. The other approach is to copy files on and off the device as needed using a file manager (iTunes works as well) or AirDrop.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

cy
cyf
Posts: 15
Joined: Mon Nov 23, 2009 10:12 am

Fri Jul 08, 2016 8:16 am Post

Thank you for your quick and thorough reply, AmberV. I have reread the article, and it seems that I have been following the guidelines all the way. Yesterday I only worked on one Mac, and all files where uploaded to Dropbox, after I quit the program yesterday. When getting back to the same Mac today, and restarting it and Scrivener, the file says it is open on another machine. It isn't. So I wonder if there could be something else in Scrivener or the file that trickers this behaviour?

I was in fact trying to figure out a better way to work on two machines, but as I am sure I will also love to be able to use the iOS-version, it seems like I am stuck with Dropbox?

User avatar
AmberV
Posts: 24131
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Jul 08, 2016 10:47 pm Post

There is nothing else that triggers that behaviour. When you load a project, the very first thing it does is check within the project package, under the Files folder, for a “user.lock” file and reads its text for details. You could leave a Finder window open to that project package subfolder—just keep it off to the side for a few days while you work, and keep an eye out for the lock file, making sure it comes and goes as it should. When the project is loaded, it should appear, when closed it should disappear. If Dropbox is restoring the file after it is removed, then you might need to reset the Dropbox cache.

I was in fact trying to figure out a better way to work on two machines, but as I am sure I will also love to be able to use the iOS-version, it seems like I am stuck with Dropbox?


As mentioned, you don’t need a Dropbox account to use the iOS version. That’s just one approach for people that want it.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles