Sharing Dive Data

Problems ? Get help here!
Post Reply
steviet
Posts: 3
Joined: Tue Mar 09, 2010 8:10 am
Dive Computer: Cobra

Sharing Dive Data

Post 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
User avatar
nick
Site Admin
Posts: 4360
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Sharing Dive Data

Post 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 ?
lionel
Posts: 13
Joined: Thu Feb 18, 2010 6:04 pm
Dive Computer: Mares Puck

Re: Sharing Dive Data

Post 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.
User avatar
nick
Site Admin
Posts: 4360
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Sharing Dive Data

Post 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.
steviet
Posts: 3
Joined: Tue Mar 09, 2010 8:10 am
Dive Computer: Cobra

Re: Sharing Dive Data

Post 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
steviet
Posts: 3
Joined: Tue Mar 09, 2010 8:10 am
Dive Computer: Cobra

Re: Sharing Dive Data

Post 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.
User avatar
nick
Site Admin
Posts: 4360
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Sharing Dive Data

Post 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.
kaotic
Posts: 7
Joined: Wed May 05, 2010 2:25 am
Dive Computer: Aries Epic
Location: San Diego

Re: Sharing Dive Data

Post 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?
User avatar
nick
Site Admin
Posts: 4360
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Sharing Dive Data

Post by nick »

Yep - a couple of people have mentioned it lately. I'll take a look.
Post Reply