INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Syncing Library between 2 Machines  (Read 11416 times)

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Syncing Library between 2 Machines
« on: January 18, 2010, 11:30:02 am »

I saw a post relating to syncing setting between 2 machines but it really didn't mention anything about the library.  I'm running an HTPC in the living room and another maching in the basement.  I'd like to go onto the basement comp and get songs, add them to the library and playslists then have this automatically sync with the HTPC.

Is there a way to do that?
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #1 on: February 17, 2010, 11:14:18 am »

I thought I'd reply to my own to get this refreshed.

Any ideas who to sync to libraries on 2 seperate machines?  If not may be something to consider for an update.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Syncing Library between 2 Machines
« Reply #2 on: February 18, 2010, 09:58:15 am »

There are LOTS of ways to do this.  The easiest is probably to just put the Library (the database files) on the network share with the media, and then point all of your copies of MC at that same Library location.  If you do it this way, only one machine can have read/write access to the library at a time (whichever machine opens it's copy of MC first will get full access to the library).  Other machines that open subsequently will get Read-Only access to the library.  There are some exceptions to the Read-Only rule though... I believe Play Counts still update, and a few other things.  Search the forum for more info here, as I don't remember the details.

The downside to this is that if you leave MC running in the basement with Read/Write access to the Library, and then come upstairs and want to use the HTPC, it will get Read-Only access.  This isn't a huge deal if you're just watching something, but if you want to do any tagging, you'll probably have to actually walk downstairs and close MC on the machine downstairs (or use RDC or something to do it remotely).

Still, though, it works well if you generally only tag files on one machine at a time, and if you don't leave MC running full-time on the HTPC.  This is what I do.  I have MC on a bunch of machines at my house, and they all access the same library via this mechanism.

The other major option would be to use the Library Server function of MC.  Try searching for more info about this.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #3 on: February 18, 2010, 04:44:57 pm »

Dynamite.  Thanks.  My HTPC in the living is 99% read only.  I don't really tag anything so I'm good.

I'm at work but I suspect since I'm networked and each computer is mapped to the other I won't have to actually move the library, I could simply point my mc on my htpc to the library files on the downstairs computer where I do all my read/write?

I also suspect there is an option to select your library location?
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #4 on: February 20, 2010, 12:00:56 pm »

Okay so I guess you do have to put all your files in 1 location then make sure the map drive is the same.  Having said that I really don't want to do that because that means I'm going to lose about 700 of space on a local drive.

So I guess the other option then is to have a server but I only see an option to search for a server.  I've briefly search but didn't find a how to.  I'm unclear as to how it works.  I have it started but does that mean all files (audio, video and images & playlists) will be available to other mc's on the network?

I've started a media server....the other computer can't find it and i've tried sync as well.  I'm sure I'm doing something wrong here.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #5 on: February 20, 2010, 05:11:24 pm »

Okay through Library sync it's found the downstairs computer but it's not merging playlists.  I have merge playlists checked which is really the only thing I want it to do but no joy.  For this to work do I need the audio files in the same location?  Meaning the computer I'm syncing to hosts the files and the computer that is syncing has that computer networked but under a different drive letter.

Basically all I'm doing is making changes to playlists in my downstairs basement computer and want them to show up on the upstairs computer.  They are both importing the music at this moment and for reasons already stated I don't want to have to move all my files to a server because I'll lose a ton of hard drive space that's in use on the local machine downstairs.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Syncing Library between 2 Machines
« Reply #6 on: February 20, 2010, 07:42:36 pm »

Okay so I guess you do have to put all your files in 1 location then make sure the map drive is the same.  Having said that I really don't want to do that because that means I'm going to lose about 700 of space on a local drive.

I can help you here, but not right now (on vacation and there's wine to drink).  I'll try to post something tomorrow or later tonight.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #7 on: February 21, 2010, 01:21:10 pm »

No worries.  Have fun and thanks.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #8 on: February 24, 2010, 06:59:47 am »

Glynor...just a friendly reminder I'd love your help when you get a second.  Or if anybody else has any insight.  I've effectively asking if in order to sync between 2 machines with 1 running server if the location of the media files have to be mapped in the exact same way?
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: Syncing Library between 2 Machines
« Reply #9 on: February 24, 2010, 08:08:25 pm »

Yes and No. It depends on how you want to "Share things".

1. If you use Library Server or DLNA, then no, everything is streamed.

2. You can share a copy of the Library itself. You can store all the files on a "network drive" that is accessable on all computers along with the library itself. In that case the files have to be on the same driver letter. This can be problematic if you already have things setup, but there are several ways around it.

I would try to get the first one working. It is much simpler to implement. If you run into issues you can always try #2. It also has the advantage of having to make no changes to the library to get working....

There are a few posts and Wiki articles on setting up both.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #10 on: February 28, 2010, 08:32:50 am »

Thanks but that didn't really help me.  It still doesn't answer my question about syncing.  As  I mentioned before sharing a library is out of the question because it will render about 500 gig of space useless and then I'd still have to buy another drive so there isn't much point.  

If you could point me in the right direction with other posts or wiki's that would be great as I've mentioned I can't find anything.  I'm looking to sync 2 libraries.  I would think based on the great functionality of this program it wouldn't be much of an issue but that doesn't seem to be the case.

To summarize I have 2 machines running 2 instances of mc.  I can't put the files on a mutual drive.  My downstairs computer is hosting the files and I'll be making changes to mc on that machine and would like to sync those changes (those changes are entirely playlists) with the upstairs computer.

Thanks.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: Syncing Library between 2 Machines
« Reply #11 on: February 28, 2010, 10:54:23 am »

Files do not have to be on one computer. In fact that is the exact setup I use. My Library is on my HTPC. My video files are on it. My images and audio files are on another computer. The library computer streams all files back to the audio/images computer. Convoluted, but works perfectly. I use Library server to do it. Bottom line is both computers can access all files using one library.

I used to use two libraries, but it was a royal PIA to keep working correctly. I then used a shared library setup that gappie mentioned. That works good as well, but is more complicated than what I currently use.

If that isn't what you are looking then I'm missing something about what you are attempting to do. If the files are not accessable from both computers, then why are you trying to "sync" them using 2 libraries? If they are accessable, why not use a shared library?
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #12 on: March 01, 2010, 06:53:43 am »

Ya we're not on the same page.  I'm not sure where you are getting that I can't access files.  I can access all files.

To summarize I'm running 2 computers with jrmc with 2 different libraries and I'm trying to sync those 2 libraries (basically just music playlists which is the only option I have selected when syncing).  The files are on a nas and on my computer downstairs (which is one of the computers running jrmc) so therefore those files that are on my downstairs computer are local ie. c:\videos\movies.  I make this point because those files are also mapped to my htpc (the other computer running jrmc) on h:\documents and settings\computer name\....  I do not want to put those movies on my nas because it will render that drive which is about 750 gig useless.  I'm not sure when you sync 2 libraries if drive letters have to be the same.  I also tried to share a library but the same thing happened.  Couldn't find the files I imagine because of the same problem with mapping.  I'm running a jrmc server on my downstairs computer and my upstairs computer is picking it up and syncing but nothing happens.

The only reason that I can think of is that in order to sync the filepath has to be the same unless of course I'm missing the entire point with syncing.  I assume it does what I'm looking for it to do which is when I change a playlist downstairs (both computers have the songs in their respective libraries) the playslist is changed on my upstairs computer.

Thanks for your help.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: Syncing Library between 2 Machines
« Reply #13 on: March 01, 2010, 05:56:49 pm »

You cannot sync 2 different libraries. What everybody has been suggesting is that you stop using two libraries and use one and and share it.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Syncing Library between 2 Machines
« Reply #14 on: March 04, 2010, 10:22:12 am »

Sorry... My vacation got the best of me (WAY too much wine to drink), but I'm back and settled now.  I should have time to explain something later this afternoon.  However, this...

You cannot sync 2 different libraries. What everybody has been suggesting is that you stop using two libraries and use one and and share it.

Is correct.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Syncing Library between 2 Machines
« Reply #15 on: March 04, 2010, 11:24:22 am »

you could also take a look to the plug prod posted on the third party forum. might do what you are after.
http://yabb.jriver.com/interact/index.php?topic=56405.0

 :)
gab
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #16 on: March 04, 2010, 03:37:56 pm »

Okay...what is the point of sync then?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #17 on: March 04, 2010, 04:00:09 pm »

I sync separate libraries. (I also use Library Server, DLNA Server and the "shared library" feature, but that's a different story.)

I have organized my library so that all PCs see identical media file paths. My main library is imported from virtual drive letters. Currently I use X:, Y: and Z:. Depending on which PC I am using the media files may be on internal hard drives, on network (using mapped drive letters) or on external hard drives (when I use my laptop outside home). I use SUBST commands in bat files for creating the drive letters when the files are not coming from mapped network drives.

The actual "Syncing" happens outside MC. Whenever I have updated the library considerably (I don't sync after every minor tag change) I run a preconfigured backup task. It copies the library files and the contents of the thumbnail cache to my server. On other PCs I run another task that updates the local files. (These tasks could be combined if the PCs are always connected to the server, but I prefer to run them separately.) I either close the MC instances or switch to an other library while the files are synced.

I use SyncBackSE, but for instance the free Karen's Replicator program can do the same.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #18 on: March 04, 2010, 04:21:08 pm »

The reply continues ...


For instance, you mentioned the "c:\videos\movies" path.

Share the C:\videos folder and map the shared folder as Z: on every PC including the PC where the files are local.

The files in MC's library will be accessed through Z:\movies

If you would like to preserve the "videos" base path move the files to C:\'something'\videos\movies and share C:\'something'\.

Then the files in library will be accessed through Z:\videos\movies.


Alternatively you can use the SUBST command on the PC that has the files stored locally.

SUBST Z: C:\video will create Z:\Movies\...

You can write more than one SUBST commands in a bat file and place the bat file in the Startup folder if you would like to always create the drive letters on system startup. In my experience a SUBSTed drive is slightly faster than a locally mapped network drive (it doesn't go through the networking subsystem).


EDIT

If you would like to fix the database to point to Z:\movies instead of C:\videos\movies, the Rename, Move, & Copy Files tool can easily mass change file paths without touching the disk files. Just remember to set it to apply the changes only to the database.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: Syncing Library between 2 Machines
« Reply #19 on: March 04, 2010, 04:34:57 pm »

Alex:

I think what jroyale wants to do is have two separate libraries with different media paths somehow sync playlists, which can't be done. He wants two separate libraries, while only syncing some things.

Also, in your example you are not really syncing two libraries, you are updating libraries from a master library. Syncing would go both ways, not one direction. It also incidentally is another config I used for while. I just used scripts but of course that has problems with locked files occasionally etc. Those utilities you mentioned would have been really helpful back then... :)

jroyale:
The purpose of sync it to synchronize changes between a client and the server when sharing a library.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #20 on: March 04, 2010, 04:35:13 pm »

glynor,

I am waiting. Your version will probably be better and also the description will probably be easier to understand.   ;)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #21 on: March 04, 2010, 04:45:41 pm »

gvanbrunt,

I think he can adopt.

The system I described can mix local files and networked files because they all will look like "networked" files.

I can run the sync process from any PC so that the repository on the server always has the most recent "master library". It isn't an automatic system but it works for me. The biggest limitation is that only one MC instance can update things at a time so it isn't anything like a multi-user system.

If there is a need to keep some files away from the view on a specific PC it is possible to handle that by configuring separate view scheme sets.

Also, the "shared library" system and Library Server will become very usable when all files are always available through the harmonized virtual paths.

Personally I also usually keep the "fix broken links" auto-import setting disabled so that occasional offline files will be preserved.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #22 on: March 08, 2010, 11:30:49 am »

Okay.  So I'm effectively getting conflicting reports but basically it looks like I can do what I want to do.

Both libraries have the same files in them just different paths.  I can sync everything but I don't need to so I just checked the sync playlist option but again they all have the same files.  The 2 libraries are effectively identical save for the path.

So I was confused as to why it wasn't syncing already but it appears it's because I don't have the same file path which I can easily change.  I was thinking on the weekend why don't I just create a new file path on the local machine so I'll do that.  I just didn't want to have to physically move the files. Also the sync will be only going 1 way ie. I make changes to a playlist on my downstairs computer and want those same changes to be transferred to my upstairs computer.  Other than starting a server and syncing (which I am currently able to do albeit with no results becase of the file paths) is there anything else I have to do?  I am hearing click share library?

Also while I'm going through this I will obviously be making changes to the library as it relates to the file path.  I have a lot of home videos which takes a great deal of time to get thumbnails for (m2t) so is there a way to point the existing files to the new path rather than removing them from the library then reimporting them?
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #23 on: March 10, 2010, 11:05:09 am »

Confirmation?  Thoughts on point files to new path?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #24 on: March 10, 2010, 02:25:08 pm »

It is difficult to give further instructions before you first familiarize yourself with what I explained earlier.

Perhaps you could build a small test library. For instance:

1) On the downstairs computer create a new local folder, e.g. "C:\shared" and copy a couple of small local audio and video folders to it. Share this folder as DS-shared

2) Do the same on the upstairs computer. Share this folder as US-shared.

3) Still on the upstairs computer:
- map a drive letter to both shared locations. E.g. map X: to \\[dowstairs computer]\DS-shared and Y: to \\[upstairs computer]\US-shared
- create a new library, load it and set Auto-Import to monitor the X: and Y: drives.
- create a library backup file

4) Back on the downstairs computer:
- Replicate the drive mappings exactly as you did on the upstairs computer ( X: to \\[dowstairs computer]\DS-shared and Y: to \\[upstairs computer]\US-shared ).
- Create a new library.
- Restore the library backup file you created on the upstairs computer.

You have now identical libraries on both PCs. The libraries see the same files through virtual paths. The local files were not physically moved on either of the PCs.

If you close one of the computers you can still access the files that are local on the other PC. The files that are on the closed PC will be offline, but preserved in the library if you don't set Auto-Import to "fix broken links".

Quote
Also while I'm going through this I will obviously be making changes to the library as it relates to the file path.  I have a lot of home videos which takes a great deal of time to get thumbnails for (m2t) so is there a way to point the existing files to the new path rather than removing them from the library then reimporting them?

You can use the Rename, Move, & Copy Files tool also for just changing the database links. It preserves the existing thumbnails. I have posted some instructions here: http://yabb.jriver.com/interact/index.php?topic=55224.msg375699#msg375699
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #25 on: March 10, 2010, 03:12:53 pm »

Basically all I'm doing is making changes to playlists in my downstairs basement computer and want them to show up on the upstairs computer.

Wonder if dumping the playlists from one MC into a common space and then importing them with the other might do it ?

I'm not too familiar with syncing to a folder but is it possible to just sync playlists to say a designated directory and then sync off it with the other ?

They are both importing the music at this moment and for reasons already stated I don't want to have to move all my files to a server because I'll lose a ton of hard drive space that's in use on the local machine downstairs.
Given that effectively there is really only one 'file' libray that both MC's can see at the same paths.
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Syncing Library between 2 Machines
« Reply #26 on: March 10, 2010, 03:52:13 pm »

JRoyale, yes your last couple of posts are essentially correct. I think you and Alex are saying the same thing. I typed the instructions below, but then afterwards saw that AlexB had said much the same thing. Not surprising really, as I've learned a lot about MC usage from him, gappie and glynor over the past 2 years.

You must have the same paths for everything, including cover art/thumbnails. This can be achieved by mapping the folder on your local PC to something like Z:\ as suggested. You can "move" all your media files from the downstairs PC to this Z folder in one go by using the rename,move, & copy files tool. All you need to do is be sure that you use the update database to point to new location option in the top-most pulldown menu. Uncheck the next couple of checkboxes, but check the third one - Find & Replace.
Find What: c:\
Replace with: z:\

This will preserve the links to the media once the folder has been mapped.

On the HTPC, you should map the shared folder that contains the media from your downstairs PC to z:\, too.

At this point what I do is tag, or modify the library from my desktop. I then make a backup of it on a NAS. When I go to my HTPC and open up MC, I always restore the latest backup from the NAS. That way I can't screw anything up on my working copy on the desktop. It's an extra 20 seconds, but it's pretty idiot-proof. There are other ways of doing it automatically, but I'm set in my ways until I have time to learn something new.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #27 on: March 14, 2010, 12:18:22 pm »

Thanks...this is what I suspected from the start it just took a while to get there.  I think we were all on the same page it just got lost in translation.  I'll try it over the next few weeks but I'm sure it'll work just fine.

Thanks for everybodies help.

Cheers!
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #28 on: March 14, 2010, 02:05:11 pm »

At this point what I do is tag, or modify the library from my desktop. I then make a backup of it on a NAS. When I go to my HTPC and open up MC, I always restore the latest backup form the NAS.
You just trashed the HTPC's existing thumbnail cache with each library restore.

Yeah, you could rebuild but thats an extra step (a looooong one) every time you do a restore.

I'm assuming you browse the HTPC via thumbs so this must be a bit trying.
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Syncing Library between 2 Machines
« Reply #29 on: March 14, 2010, 03:18:16 pm »

You just trashed the HTPC's existing thumbnail cache with each library restore.

Yeah, you could rebuild but thats an extra step (a looooong one) every time you do a restore.

I'm assuming you browse the HTPC via thumbs so this must be a bit trying.

Hmmm, that would explain much. :) Thanks. So I guess it's time to see how the cool kids do it.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #30 on: March 14, 2010, 05:43:37 pm »

There's no cool way to do this i'm afraid :(

It involves doing the same thing as you have with filepaths for the library but also with the thumbnail cache ie creating the illusion that nothing has changed on the HTPC MC.

The cache files (jmd files) to copy over are loated in
 C:\Documents and Settings\<your login>\Application Data\J River\Media Center 14\Thumbnails\{xxxx-xxxxx-xxxxx--xx-xx}\Normal (v3)\<assorted .jmd files>

The above is for XP, on other versions of windows the path might be slightly different

The folder in braces is the unique ID of the library you use. It's counterpart folder on the HTPC has to match the one on the desktop. If you use multiple libraries then their corresponding caches would likewise also have to be recreated.

- Close MC on the HTPC
- Delete the jmd cache files on the HTPC or move them elsewhere.
- Copy over the jmd cache files from the desktop to the HTPC
- Open MC & then restore the library.

As you can see this is tedious to do on a regular basis maybe a script could help.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #31 on: March 15, 2010, 10:39:02 am »

Quote
- Open MC & then restore the library.

A library restore clears all thumbnails. In addition, the thumbnail files and the library files must be from the exactly same snapshot in order to keep them synced. Even if you would like to extract the backup zip file to the library location outside MC that probably would not work correctly because the separately copied thumbnail files would already be from a newer time than the library backup file.


The cryptic and restricted user specific paths like "C:\Documents and Settings\<your login>\Application Data\J River\Media Center 14\Thumbnails\" are not a problem if the library files and the thumbnails are set to be stored in easily accessible shared folders.

My libraries are in C:\MCstuff\libs and thumbnals in C:\MCstuff\thumbs on every PC. When I sync libraries I close the MC instances and replicate the contents of the MCstuff folder behind MC's back.

I have posted instructions for relocating the thumbnail cache just a few days ago here:
http://yabb.jriver.com/interact/index.php?topic=56496.msg383601#msg383601

(A word of warning to anyone who attempts to do the above: read the linked reply & thread carefully and if you are not familiar with editing Windows Registry please educate yourself first. A Google search will find lots of web pages that will help.)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #32 on: March 15, 2010, 11:37:28 am »

A library restore clears all thumbnails. In addition, the thumbnail files and the library files must be from the exactly same snapshot in order to keep them synced. Even if you would like to extract the backup zip file to the library location outside MC that probably would not work correctly because the separately copied thumbnail files would already be from a newer time than the library backup file.
I did not understand why there would be a snapshot difference when doing a library backup, cache copy + restore  ?

When moving from one version to the next, this same hack works. So what is the difference when applying it to a another machine ?

In any case we'll know soon enough when ppl tell us how well or not it went.

The cryptic and restricted user specific paths like "C:\Documents and Settings\<your login>\Application Data\J River\Media Center 14\Thumbnails\" are not a problem if the library files and the thumbnails are set to be stored in easily accessible shared folders.
Your post deals with several users on the same machine, that's the main motivation to use a custom common location for thumbs + library which is retained via numerous different logins. One restore syncs MC for all the users on that box, not to mention avoids having to replicate the large cache files + library for every single user on the box.

I'm assuming single login on the two machines here so there is no functional difference with using the default locations.

My libraries are in C:\MCstuff\libs and thumbnals in C:\MCstuff\thumbs on every PC. When I sync libraries I close the MC instances and replicate the contents of the MCstuff folder behind MC's back.
Yep, MC knows nothing.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #33 on: March 15, 2010, 11:59:04 am »

I did not understand why there would be a snapshot difference when doing a library backup, cache copy + restore  ?

When moving from one version to the next, this same hack works. So what is the difference when applying it to a another machine ?

A restore using the Restore tool clears old thumbnails. This is by design. (Or at least it used to do that, I have not tested this for some time).

When you create a backup file inside MC you still have MC running. After that and at least during the shutdown MC saves lots of open jmd files and thus they will be from a different time.

Quote
In any case we'll know soon enough when ppl tell us how well or not it went.
Your post deals with several users on the same machine, that's the main motivation to use a custom common location for thumbs + library which is retained via numerous different logins. One restore syncs MC for all the users on that box, not to mention avoids having to replicate the large cache files + library for every single user on the box.

I'm assuming single login on the two machines here so there is no functional difference with using the default locations.

This time the point is to move the thumbnails to a different location that can be shared easily and accessed from a remote computer. Normally the user specific application data folder is quite protected against intrusions.

When the thumbnail files are in a shared folder on the root of C:\ you can easily grab or replace them through LAN .
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Syncing Library between 2 Machines
« Reply #34 on: March 15, 2010, 12:34:39 pm »

Does it matter that I don't use snapshots, but rather cover art files for every video I have. For music videos I take a snapshot and then use the file as cover art. DO the thumbnails of the cover art have to be "regenerated" on a library restore too? The cover art files are stored at a common location on the network.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #35 on: March 15, 2010, 02:34:25 pm »

A restore using the Restore tool clears old thumbnails. This is by design. (Or at least it used to do that, I have not tested this for some time).
I doubt this behaviour will change in the future. It's optimised for fast access so the actual structure has to be tightly tied to the library's state.

I see now why the restore/backup won't work. Copying over the cache because a restore kills it only to do another restore again !!

Instead just copy the library + cache as is to the other. Yeah, thats what all the new versions do, just copy over the existing library and is also why copying the thumbnails cache over to the new version just works.

This way snapshot & everything is in sync :)

Normally the user specific application data folder is quite protected against intrusions. When the thumbnail files are in a shared folder on the root of C:\ you can easily grab or replace them through LAN .
Things were not so locked down on XP.

Easier then to have a custom location which can be zipped up and restored on the other machine this way.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #36 on: March 16, 2010, 09:09:40 am »

Question...I'm trying to map the loca drive but it's not working.  For instance the resolution to my issue was to may my c:\....my music folder so both machines had the same file path.  It's not letting me.  I'm in win xp...I've tried using the browse feature (when I click the local drive the okay button is grey'd out) and simply by typing the file path which returns a could not find.
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #37 on: March 16, 2010, 09:19:42 am »

Okay...found a program to do it.  But I noticed that you mentioned I have to map all drives including cover art.  Since jriver stores that locally it makes it an issue and I got a little lost on the subsequent posts.

Thoughts?
Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Syncing Library between 2 Machines
« Reply #38 on: March 16, 2010, 09:23:32 am »

Try to use the Move and Rename tool on the path tags. It will update any path problems on the media it self. Test it out on a FEW files the first time though!

You can also use the command subst in the command prompt to combine directories from other disks or places on the same disk, to other directories. This might work with network shares as well?
Logged
- I may not always believe what I'm saying

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #39 on: March 16, 2010, 10:02:33 am »

Okay that went okay.  Actually while I was in the middle of doing that jriver found them all so it was fine.

Now the issue is I've done everything right, both are mapped to the same drive letter, I sync'd and nothing happened.  I selected merge files and merge playlists and it didn't work.  Prior to the sync I deleted a playlist to see if it would get repopulated with the one from downstairs.

I'm thinking it may be that it can't find the other server.  When I click search it says it can't find it.  I put in 'm01p://Den' and it looks like it works but then I put in 'm01p://test' and it does the same thing and clearly that is just a test...there is no server.  I have also put in 'm01p://192.168.0.100' and nothing there either.  I am running trendmicro but I have mc14 as an exception both ways and I also have put in the mc14 in the system32 folder.  Still nothing.

Where am I going wrong?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #40 on: March 16, 2010, 10:03:45 am »

I have already explained this, but let's do it once again.

It would be better to move the media files away from Microsoft's stupid "my something" system. Windows Explorer can do it quickly.

For example:

From: C:\Documents and Settings\[replace this with your username]\My Documents\My Music\

- select all folders (and files if you have any in the root) and drag & drop them...

To:  C:\Media\Music\  (create these folders first)

After that share the C:\Media\  folder and map an unused drive letter to it. For instance Z:

When you browse the Z: drive you can see that it contains the "Music" folder and under it your subfolders and files.

Inside MC you will need to fix the base path with the RM&CF tool  (I'm going to use this abbreviation instead of "Rename, Move, & Copy Files")

1. Create a fresh library backup file (it's good to have it if something goes wrong)

2. Disable the Auto-Import feature (untick all, especially the "run in background" setting). Auto-Import can be re-enabled after the file paths are fixed.

3. Fix the library to point to this new base path:
   - Select all files and open the RM&CF tool.
   - Select the Update database point to new location (no file rename, move or copy) option
   - Tick only the Find & Replace option
   - Find what: C:\Documents and Settings\[replace with your Windows user name]\My Documents\My Music\
   - Replace with: Z:\Music\

Take care that both strings end with a backslash and verify that the filenames in the preview box are correct.


At this stage cover art will still be coming from the old source, whatever it happens to be. We can fix that later. For that we will need to know where your cover art is stored now. "jriver stores that locally" is not a useful answer.

The thumbnailing system is a separete thing (the thumbnail cache contains only specially organized and usually lower resolution copies of the actual cover art files for quicker display). It is better to not even think about the thumbnails before everything else is working as preferred.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #41 on: March 16, 2010, 10:13:30 am »

The above was the step 1 from the following list:

1) Move the local media files on the first PC to a simple shared path and map it to Z:. Fix MC's library to use that drive.

2) Move the local media files on the second PC to a simple shared path and map it to some other drive letter, for instance Y:.  Fix MC's library to use that drive.

3) On the first PC Map the other PC's shared folder to Y: and import the media files, so that the local library consists of local files that are coming from Z: and networked files that are linked through the drive letter Y:

4) On the second PC do similar steps, except that here the local files are on Y: and the networked files are on Z:

These steps will make the libraries interchangeable (except cover art that may not work correctly yet).

Auto-Import can handle new and changed media files, but later on we can consider if it is necessary to actually copy the library files from a PC to another. That would be syncing (not automatic, but useful for copying things like new playlists)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #42 on: March 16, 2010, 10:26:52 am »

Okay that went okay.  Actually while I was in the middle of doing that jriver found them all so it was fine.

Now the issue is I've done everything right, both are mapped to the same drive letter, I sync'd and nothing happened.  I selected merge files and merge playlists and it didn't work.  Prior to the sync I deleted a playlist to see if it would get repopulated with the one from downstairs.

I'm thinking it may be that it can't find the other server.  When I click search it says it can't find it.  I put in 'm01p://Den' and it looks like it works but then I put in 'm01p://test' and it does the same thing and clearly that is just a test...there is no server.  I have also put in 'm01p://192.168.0.100' and nothing there either.  I am running trendmicro but I have mc14 as an exception both ways and I also have put in the mc14 in the system32 folder.  Still nothing.

Where am I going wrong?

IMHO, almost everything is going wrong. Those addresses are related to Library Server. It is one option, but it does not allow a library that is "shared" from more than one computer unless the files are re-organized and shared on the OS level as I have tried to explain. I have assumed that you want to use local files and files on the other PC equally.

The new Z: and Y: file locations would actually make the Library Server more usable. For instance, you would be able to start the server on one of the two PCs, run an MC client on a third PC (perhaps on a new netbook or similar) and it would see a server library that consists of files that are coming from the two other PCs (i.e. from Z: and Y:).
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #43 on: March 16, 2010, 08:15:30 pm »

Alex,

I really appreciate your help.  I'm finding this lengthy post a little difficult to follow frankly so I'm sorry if I missed an earlier suggestion.  In your post 41 when you talk about interchangeable libraries would it matter at all if I told you that they are the exact same already because computer 2 is getting it's files from computer 1 and those files are stored locally (on computer 1) and now the files paths are the same as well or is it simply the process of going through the madness that you explained. 

Again, if answered or known I apologize I just want to be clear (because it seemed there was some earlier confustion) that I'm only making changes on computer 1, that's it never computer 2.  I only want to update the playlsits on computer 2 to see the changes made on computer 1.

Thanks again.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Syncing Library between 2 Machines
« Reply #44 on: March 16, 2010, 09:11:39 pm »

It was not intended to be followed only by reading the complete post and trying to imagine the process. They are simple step by step instructions that can be actually done step by step by following them by letter (preferably first with a small test library as I instructed earlier).

However, as you now have identical file paths on both PCs the libraries are then interchangeable. You can run a backup process that replicates the library files after each session. After you have maintained the library on one PC replace the library files on the other PC with these maintained files. I.e. after you have ripped, imported and tagged on the PC "A" copy the library files to the PC "B". After you have created new playlists on the PC "B" copy the library files back to the PC "A". This can be made semi-automatic by configuring a backup program to do these tasks and (for instance) by placing shortcuts icons on both desktops to start the tasks.

Alternatively you can use a shared library folder. The PC that opens the library first has read and write rights. If the other PC opens the same library it can only read. So after doing changes on the PC "A" close MC or change to another library. When you open the now closed library on the PC "B" you can save playlists.

The third option is to run Library Server on the PC "A" and try to sync the library changes (i.e. in your case the playlist changes) from the client PC "B", but I am not sure the playlist updates work correctly. I have never bothered to fully test the sync that can be started from a Library Server client. Some problems were reported and I don't think it is flawless. I may be wrong in this.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #45 on: March 17, 2010, 07:43:52 pm »

Again Alex I appreciate your help but i tend to get lost with your explanations.  I'm curious as to a function within jrmc like sync that makes someone go to all of these lengths to work.  It just strikes me as odd.  I'm not trying to manipulate the program in any way, it's a menu option.  I may be off here so what is the purpose of library sync if it isn't to sync 2 libraries.  I'm not being  facetious in any way I just don't get it.

I think that if you have 2 computers with 2 jrivers you should be able to sync them pretty easily but who am not that sophisticated.

I think what I may end up doing now is sharing a library which I didn't want to do because I didn't want to physically move files but now I will just map a local drive which I hadn't thought for some unknown reason.  It just means replicating what I've spent a lot of time doing one computer (sorting, views etc) and doing it on another.
Alex...thanks a lot for your help and I'm sure if I got you on the phone it would make a lot more sense.  Forums are great but disjointed at times.  On that note I’m willing to pm my phone number to chat about it if you don't want all your hard work to go unheralded.

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #46 on: March 18, 2010, 04:21:15 am »

I'm curious as to a function within MC like sync that makes someone go to all of these lengths to work.  It just strikes me as odd.  I'm not trying to manipulate the program in any way, it's a menu option.

I may be off here so what is the purpose of library sync if it isn't to sync 2 libraries.  I'm not being  facetious in any way I just don't get it.

I think that if you have 2 computers with 2 jrivers you should be able to sync them pretty easily but who am not that sophisticated..
 
From this thread

Library Sync has two discrete functions.

If you're not connected to a server, it will sync the actual files to your local machine.

If you are connected to a server, it will synchronize with the server (send changes, read other client changes).
I guess what Matt means by 'not connected' is if drives on the server are not mapped to the local machine that a sync will copy all media files from the server to the local machine.


More here

1)  What specific changes are made when doing a "library sync"?  Is it just the actual "files" that are kept in sync, or do changes made to things like view schemes also get "synced"?  Just how many "areas" does the library sync effect?
A) Playlists and all tags get synched. Viewscheme changes do not.


2)  How does the library sync handle changes made to the same "item" on both the client and server systems? 
Does it track each individual change on both systems, or
does it just look at media file and/or library file modified times, or
does it only work in the client to server direction, or...? 

If I change the genre of a song on the client, and later change the name for the same song on the server and THEN do a library sync, what happens? 
Do I end up with the new genre AND the new name, or do I just end up with the new name given that this file has the most recent date, or...?
A) Matt said that the most recent computer to make a change to a file wins, so if two computers made a change to the same file, the last one to sync would overwrite that file's library data. I assume that means not just for the specific tag that was changed, but would write all the tags in that file.



3)  Does the client need write permission on the server's drive/s in order for it to work?  If so, which drives and/or folders would need to be included?
A) No



4)  Does it make a difference if I select "Sync Library" on the client as opposed to the server -- i.e. does the system used to start the operation make any difference?
A)  I think so. I think you are supposed to sync from a client and the server gets updated. I dont think it's possible to sync all clients to a server from the server itself.



5)  If I do NOT want a client system to be able to make changes on the server (even if somebody selects "Library Sync"), is there any way to actually PREVENT a Library Sync from making changes to the server?
A) No

So lets apply the above to this situation and determine what a sync entails

Files added to server, desired changes on server to be updated on the HTPC, the server's drives are mapped to the HTPC so both see the same files.

From which MC does the sync need to be performed so the above works ?
Neither as there is nothing to sync here the client is only used to view the server. Any changes on the server automatically are viewed from the client. Might need to reconnect from the client to get the latest change.

Point 4 implies that only a client can update the server. So any tag changes made on the client can only be sync'd back to the server. So sync means update the server from the client and nothing more in this context.


I think what I may end up doing now is sharing a library which I didn't want to do because I didn't want to physically move files but now I will just map a local drive which I hadn't thought for some unknown reason.
If you map the servers drive to the HTPC as mentioned earlier by Alex, then both copies of MC see the same files there is no moving of files whatsoever.

It just means replicating what I've spent a lot of time doing one computer (sorting, views etc) and doing it on another.
You will not be replicating work if you add files to the library on your server and then use the HTPC to view those changes.

After the drive mapping is completed, you view from the HTPC via Library server and all your changes on the server should be reflected in the HTPC client. There is no need to sync anything in your case as its view only and no changes occur on the HTPC.

You are done :)
Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #47 on: March 19, 2010, 02:02:43 pm »

Quote
Point 4 implies that only a client can update the server. So any tag changes made on the client can only be sync'd back to the server. So sync means update the server from the client and nothing more in this context.

So am I to understand the server gets updated from clients and not the other way around?  If that is the case what is the earlier point about conflicts.  This would presume to say that changes on either the client or server side are sync'd.  If you are to say you can only connect from the client to the server that is different.

Quote
From which MC does the sync need to be performed so the above works ?
Neither as there is nothing to sync here the client is only used to view the server. Any changes on the server automatically are viewed from the client. Might need to reconnect from the client to get the latest change.

This I don't get it appears you are saying there is nothing to sync. Why is that?  Fist I understood you to say the client updates the server now it appearsyou are saying the client is only used to view the server.  Unless I'm getting mixed up with your wording...I'm taking it literally.

Quote
After the drive mapping is completed, you view from the HTPC via Library server and all your changes on the server should be reflected in the HTPC client. There is no need to sync anything in your case as its view only and no changes occur on the HTPC.

Firstly I can't connect to the library server.  How do I view via a library server? 

Logged

jroyale

  • Galactic Citizen
  • ****
  • Posts: 349
Re: Syncing Library between 2 Machines
« Reply #48 on: March 19, 2010, 02:30:39 pm »

Alex,

I further read your post and now I understood what you were saying but I don't hink it applies.  Firstly there are no files located on the local htpc, only the basement computer and a nas so there is no need to map drives from my htpc and create a redunate importing structure.

Secondly I don't want to copy files over to the HTPC and then the playslists.  This has gotten a little out of hand given all I really wanted to do was sync some playlists.  Now that the music is mapped to the same drive letters I can export the playslist from downstairs and import it on the htpc but it is a pain given i have about 20 playlists and I add / make modifications weekly.

Unless I missed something which it appears I'm doing regularly because my brain doesn't work like this, I think this was your intent.

Situation overview

HTPC - no local files and no changes to anything only viewing and listening - imports all same files as basement computer
Basement - some local files but mapped to same drive as htpc - imports all same files - I will make changes to playlists here and then I want those changes to be reflected on the htpc

My impression was that if you ran a server (with mc running) on the basement computer and then told the HTPC to sync playslists with that server it would.  However I don't even think it's finding it.  The find servers function comes up empty.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Syncing Library between 2 Machines
« Reply #49 on: March 19, 2010, 02:59:18 pm »

So am I to understand the server gets updated from clients and not the other way around?
Yes & No :)

You can update the server from the client should you need to do so, this is what is called sync. Say if you wanted to make any tag changes but from the client and have those changes update the server then you would 'sync' those changes back from the client.

If you access the server from the HTPC via library server, then it should connect to the server's library and display on the client what the server has. If you then make any changes at the server, i think a reconnect from the client will refresh the client's view. In this case you do not sync anything as you are just refreshing the view.

If that is the case what is the earlier point about conflicts.  This would presume to say that changes on either the client or server side are sync'd.  If you are to say you can only connect from the client to the server that is different.
You connect from the HTPC to view the server, thats all you want to do. Display whats on the server at the HTPC.

This I don't get it appears you are saying there is nothing to sync. Why is that?

See above

Fist I understood you to say the client updates the server now it appearsyou are saying the client is only used to view the server.  Unless I'm getting mixed up with your wording...I'm taking it literally.
The client updates the server if you want to update changes back to the server. But in your case its the opposite. You want to view changes on the server from the client. I think there is no sync involved here becuase its just pulling the library from the server over to the HTPC and displaying it.

Firstly I can't connect to the library server.  How do I view via a library server?  
You need to start the library server at the server end and then connect to it from the client. I'm assuming there is a network connection between these two PCs. Did you follow the instructions mentioned in the wiki
Logged
Pages: [1] 2   Go Up