Dropbox syncing works!

252 views
Skip to first unread message

Andrew Janjigian

unread,
Nov 7, 2008, 12:26:15 PM11/7/08
to yojimb...@googlegroups.com


Hoping this one gets past the censors around here:

I have finally had enough of trying to keep my YJ libraries in sync via dotmac. I have been using YJ for years, across half a dozen machines, and syncing has worked most of the time, but inevitably over time the libraries would get out of sync, requiring a deep reset of dotmac, a process that takes at least a few hours to complete. I "fixed" syncing a few weeks ago, only to have it get fracked up again this week. 

Today I tried out Florian's method of syncing via dropbox, and I can verify that it does work. Syncing is rapid and reliable (faster than dotmac too; changes appear within minutes.) Until BB comes up with a robust syncing method, this is what I'll be using. (I suspect it wouldn't be too difficult to build Dropbox syncing into a new version; 1Password has recently been updated to sync over a variety of DAV drives, and is much more reliable as a result.)

So far, the only drawback I have found with this method is that you MUST quit YJ before leaving a machine to work on another. If you do not do so, the library is left in a state that causes the second copy to give a "Yojimbo is already running error" when opened. This is definitely an annoying bug, since if you walk away from an open YJ library that is on a remote machine, other copies will be inaccessible until you can return to that machine and close it. If anyone has any suggestions on how to avoid this, please let me know.

Here is the method in full. (YMMV, caveat emptor, yadda yadda):

1. Quit YJ and backup your complete library on each machine. Dragging the Yojimbo folder (or Option-Dragging to duplicate rather than move it) from Home/Library/Application Support/ to the Desktop will suffice.

2. Turn off YJ syncing in the dotmac or MobileMe panel on each machine.

3. Make sure that Dropbox is installed and running, and in its default location. (at the top level of your Home folder).

4. Open Terminal on the machine that has the full library (if they are all identical, then any one of them).

5. Run the following commands on that machine:

mv ~/Library/Application\ Support/Yojimbo ~/Dropbox

ln -s ~/Dropbox/Yojimbo ~/Library/Application\ Support/


6. Let Dropbox sync the new items. Depending on the size of your library, this could take awhile.

7. Start YJ and confirm that the library is working and full.

8. Quit YJ.

9. On each OTHER machine, open terminal and run this command:

ln -s ~/Dropbox/Yojimbo ~/Library/Application\ Support/

10. Make sure that Dropbox has synced the YJ library on that machine fully, then open YJ to test it out.

11. Quit YJ, and then move on to the next machine.


I hope this is helpful to some of you, and many thanks to Florian for coming up with this in the first place.

Andrew





Dennis

unread,
Nov 7, 2008, 12:53:56 PM11/7/08
to yojimb...@googlegroups.com
On Nov 7, 2008, at 9:26 AM, Andrew Janjigian wrote:

> Today I tried out Florian's method of syncing via dropbox, and I can
> verify that it does work. Syncing is rapid and reliable (faster than
> dotmac too; changes appear within minutes.)

The problem with this method (at least as far as I can tell) is that
it seems to be an all-or-nothing copy rather than the record-level
sync .Mac/MobileMe implements. So if you add a Yojimbo password item
on one machine and a new PDF on another machine and then sync, you'll
end up loosing data as one database overwrites the other. Am I missing
something?

-Dennis

Andrew Janjigian

unread,
Nov 7, 2008, 12:58:13 PM11/7/08
to yojimb...@googlegroups.com
Dennis -

This is true, but until the "Yojimbo already running" error can be gotten around, you can't have more than one copy running at a time, thus no such overwriting is possible.

Andrew

Dennis

unread,
Nov 7, 2008, 1:10:42 PM11/7/08
to yojimb...@googlegroups.com
On Nov 7, 2008, at 9:58 AM, Andrew Janjigian wrote:

> This is true, but until the "Yojimbo already running" error can be
> gotten around, you can't have more than one copy running at a time,
> thus no such overwriting is possible.

But even if there was a way to work around the "Yojimbo already
running" limitation, wouldn't the same all-or-nothing copy problem
still exist? Unless Dropbox can somehow read the contents of Yojimbo's
database, it seems unlikely that it can do anything other than a file-
level copy. After all, it's just copying the file back and forth
between machines, similar to .Mac/MobileMe iDisk sync, isn't it?

-Dennis

Bob Withers

unread,
Nov 7, 2008, 1:12:03 PM11/7/08
to yojimb...@googlegroups.com
I can't speak to the state of the file if it was updated on two
machines at the same time which, as Andrew as pointed out is currently
not possible with Yojimbo, but Drop box does not sync the entire file
but rather it syncs deltas. While this isn't "record level" it is an
approximation of it - only the data that has changed is synced.

Regards,
Bob

Derek Belrose

unread,
Nov 7, 2008, 1:12:52 PM11/7/08
to yojimb...@googlegroups.com
If Yojimbo stores all data in a file, whenever that file is changed it
will be synced. So yes, the .Mac integrated sync works on a per
record basis, but dropbox will sync the file over and over again.

Andrew Janjigian

unread,
Nov 7, 2008, 1:29:04 PM11/7/08
to yojimb...@googlegroups.com
I'm no expert, but I am pretty sure that Bob is correct, Dropbox only syncs the new part of the file, not the entire DB. Here's why: It took ~20m to first sync the db on my machines. When I add a new item now, it takes about 2 seconds.

AJ

Dennis

unread,
Nov 7, 2008, 2:05:49 PM11/7/08
to yojimb...@googlegroups.com
On Nov 7, 2008, at 10:29 AM, Andrew Janjigian wrote:

> I'm no expert, but I am pretty sure that Bob is correct, Dropbox
> only syncs the new part of the file, not the entire DB. Here's why:
> It took ~20m to first sync the db on my machines. When I add a new
> item now, it takes about 2 seconds.

That sounds pretty cool. But I think the only advantage to this kind
of incremental copying is faster transfer rates. The mechanism doesn't
actually understand the file content or do any kind of Yojimbo record-
level syncing. So you still have a risk of data loss if you forget to
sync your data on one machine before switching to another. I'd also
fear an increased risk of database corruption.

But, of course, I could be completely wrong. :-)

-Dennis

Bob Withers

unread,
Nov 7, 2008, 2:24:30 PM11/7/08
to yojimb...@googlegroups.com
Dennis,

I'm not saying that the type of corruption you are talking about can't happen as there is probably a possibility it could.  You really don't need to "remember" to sync, dropbox automatically detects changes and syncs them but if you had two machines off the Internet for a while and were making changes on both then it would probably be pretty easy to either lose data or corrupt the file.

Since Dropbox store deltas one nice feature they have is the ability to restore a file from a previous version.  If you ever found that a file was corrupted or updated in error you could restore back to the last good version of the file.  Not perfect but better than nothing.

Related to the delta syncing the following is from the Dropbox website:

Dropbox is also smart with how it tracks changes to files. Every time you make a change, Dropbox only transfers the piece of the file that changed (also known as block-level or delta sync), making it easy to work with big files like Photoshop or Powerpoint documents. 

Regards,
Bob

Dennis

unread,
Nov 7, 2008, 6:02:22 PM11/7/08
to yojimb...@googlegroups.com
On Nov 7, 2008, at 11:24 AM, Bob Withers wrote:

> You really don't need to "remember" to sync, dropbox automatically
> detects changes and syncs them but if you had two machines off the
> Internet for a while and were making changes on both then it would
> probably be pretty easy to either lose data or corrupt the file.

Thanks for the clarification, Bob. I really don't mean to be a
curmudgeon about this. I'm glad some people are finding alternatives.
Just want to ask the important questions.

> Since Dropbox store deltas one nice feature they have is the ability
> to restore a file from a previous version.

That certainly sounds handy - a nice safety net.

> Every time you make a change, Dropbox only transfers the piece of
> the file that changed (also known as block-level or delta sync),
> making it easy to work with big files like Photoshop or Powerpoint
> documents.

Without having seen the Dropbox Web site, that's exactly what I was
imagining. I think the rsync Unix utility has the same capability (Or
was it somewhere else? Don't recall now).

-Dennis

Andrew Janjigian

unread,
Oct 27, 2009, 7:20:56 PM10/27/09
to yojimbo-talk
It seems that the lockfile has changed with YJ 2.0. For me at least, the software no longer gives the error message when I leave the program running on one machine and open it on another. Unfortunately, this does not mean that it can be left open all the time, since Dropbox then creates two versions of the database, and syncing breaks.

Is anyone else experiencing this?

- aj





On Fri, Oct 23, 2009 at 10:51 AM, bgarlock <bgar...@gmail.com> wrote:
"If you do not do so,
the library is left in a state that causes the second copy to give a
"Yojimbo is already running error" when opened. This is definitely an
annoying bug, since if you walk away from an open YJ library that is
on a
remote machine, other copies will be inaccessible until you can return
to
that machine and close it. If anyone has any suggestions on how to
avoid
this, please let me know. "


You need to remove the Yojimbo lock file.  This file resides in ~/
Library/Application Support/Yojimbo/.Yojimbo.lock
(note the period (.) before the filename, which makes it a hidden
file, and not viewable, by default, in the Finder.  I wrote a simple
bash script that removes this lock file:
-----------------------------------------------------------------------------------
#!/bin/bash
#
#
rm ~/Library/Application\ Support/Yojimbo/.Yojimbo.lock
------------------------------------------------------------------------------------

Name it what ever you like, and make it executable:

chmod a+x yj-clearLock.sh

(or whatever filename you use)

Copy it to somewhere in your PATH so you don't have to specify the
full path to it, and then just type in the name of the file to run it,
and it will remove the lock file.


Good Luck!







Jim Correia

unread,
Oct 28, 2009, 9:17:12 AM10/28/09
to yojimb...@googlegroups.com
On Oct 27, 2009, at 7:20 PM, Andrew Janjigian wrote:

> It seems that the lockfile has changed with YJ 2.0. For me at least,
> the software no longer gives the error message when I leave the
> program running on one machine and open it on another.
> Unfortunately, this does not mean that it can be left open all the
> time, since Dropbox then creates two versions of the database, and
> syncing breaks.

The lockfile logic changed in 2.0 such that you won’t get a warning
when you are sharing your Yojimbo data via Dropbox. (This was a side
effect of other changes & improvements.)

This will be corrected in a future release.

- Jim

Reply all
Reply to author
Forward
0 new messages