Page 1 of 1

Sharing Dive Data

Posted: Tue Mar 09, 2010 8:15 am
by steviet
Hi,

Sorry if this is posted somewhere but I couldn't find it. If I wanted to share the sqlite database I know I can copy it from one machine to the other, and that works fine. Is there a way to move the sqlite database to a shared folder and point MacDive to it? To be clearer, is it possible to copy the dive data to a dropbox folder and point the program to it so I can run two copies with the same database without having to synchronize them?

Thanks for any help...

Steve

Re: Sharing Dive Data

Posted: Tue Mar 09, 2010 9:39 am
by nick
Not that is supported by the app itself, but you could go here:

/Users/your username/Library/Application Support/

You should see a MacDive directory, with the sqlite file. You could move that directory somewhere else, then replace it with an alias that points to the new location. Again this isn't a supported thing, so if you had it say on a network mount and the mount wasn't there, you'd probably get some strange things happening. But it may be enough, and it should work fine.

May I ask - what is your end goal ?

Re: Sharing Dive Data

Posted: Tue Mar 09, 2010 5:05 pm
by lionel
Be careful with such a setup: sqlite is not designed for such a use, because locking behaviour is different for local and remote files. Should the situation arise where two users want to update the database at the same time, result is unpredictable and database corruption is likely to occur.

Re: Sharing Dive Data

Posted: Tue Mar 09, 2010 5:42 pm
by nick
Of course. This would be very fragile, and my reply was aimed towards single-use on the same machine. So, logging out of one account, and into another and having the data available. (not fast user switching).

So, it's not a supported operation, as I said. Hence, I wonder what the motivation is so I can look at providing a proper solution.

Re: Sharing Dive Data

Posted: Tue Mar 09, 2010 8:09 pm
by steviet
nick wrote:Of course. This would be very fragile, and my reply was aimed towards single-use on the same machine. So, logging out of one account, and into another and having the data available. (not fast user switching).

So, it's not a supported operation, as I said. Hence, I wonder what the motivation is so I can look at providing a proper solution.

My end game would be that I have two machines that I would like to sync my dive computer with. When I go on trips I download my data to my laptop but when I dive at home I use my iMac. If I were able to put the sqlite database in the Dropbox folder and point the software to it I would automatically keep all my data in sync with both machines. It sounds like the alias pointing to the dropbox location would work, I'll give it a shot and let you know how it works.

I understand your comments about the fragility of it and my assumption is that only one machine has the program running at any one time.

Thanks for the responses.

Steve

Re: Sharing Dive Data

Posted: Tue Mar 09, 2010 8:31 pm
by steviet
steviet wrote: It sounds like the alias pointing to the dropbox location would work, I'll give it a shot and let you know how it works.

I tried the moving the MacDive Application Data folder from the Application Support folder to my DropBox folder. I made an alias of that folder and moved it back to the Application Support folder and used the same name MacDive. When I start the MacDive application I get an error message that tells me the "The FIle Name is Invalid."

Gotta run to work so I'll have to pick this up again later. I may be better off just making an Automator Finder Plugin to manually sync the databases. But it sure would be easier (plus a backup/revision copy in dropbox) use the alias solution or point the program to the database location.

Re: Sharing Dive Data

Posted: Wed Mar 10, 2010 11:25 am
by nick
Ah, ok, I had the same problem after trying it just now. I'll have to take a look at this and think about a proper solution for you.

Re: Sharing Dive Data

Posted: Wed May 05, 2010 4:00 pm
by kaotic
I'm also interested in this, and for the same reason, when I'm home I primarily use my iMac but when I travel I use my Macbook, it would be nice to be able to have the database in your Dropbox folder. Then Dropbox will keep it synced across both machines, and just have the app use the database from the new location. is it possible to put this in as a feature request for 2.0 or 2.1?

Re: Sharing Dive Data

Posted: Wed May 05, 2010 4:25 pm
by nick
Yep - a couple of people have mentioned it lately. I'll take a look.