INTERACT FORUM

Please login or register.

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

Author Topic: NEW: Copy Library and Files from Server  (Read 6978 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
NEW: Copy Library and Files from Server
« on: January 11, 2024, 12:21:48 pm »

Description
This tool allows you to connect to an MC Server and copy all of its files and the associated library. 

It could be used to set up a new machine or to make a backup of everything on a second machine.  When you're done, you just connect to the new library on the client machine and you're in business.  It should look the same as the original machine, the server you copied from.

Instructions
1.  Back up your library on your current machine before starting.  File > Library > Back up
This would let you revert to that library if needed by restoring from the backup.

2.  Connect to a Library Server on any machine.  File > Library, then select the machine.

3.  Set the desired locations for the new library on your local machine.  This is where the files will go when copied.  The drive(s) need to have plenty of space.  MC will check.

4.  Set the desired location for your Library database.  It can be anywhere, but not in any media file directory and preferably on a fast local drive.  It should not be on a NAS.

5.  Under the File Menu, select "Copy Library and Files from Server" and go get a cup of coffee.  Depending on the number of files and the network connection, it could take an hour or more.

6.  When finished, MC will switch to the new library you've just copied.  It should look and work just as it did on the machine you've copied from.

Logged

S. Pupp

  • Junior Woodchuck
  • **
  • Posts: 85
Re: NEW: Copy Library and Files from Server
« Reply #1 on: January 22, 2024, 07:26:39 pm »

Is this only for Windows servers/clients, or can it be used to transfer a library from a Windows server to a Mac client?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: NEW: Copy Library and Files from Server
« Reply #2 on: January 23, 2024, 01:05:41 am »

I've used it successfully from Linux to Windows.  I don't know of any limitations.  It's easy to try.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #3 on: January 24, 2024, 02:52:21 pm »

Sorry, but I just don't understand how to use this tool.

I'm on a Windows client and click File > Library.  This opens the attached popup menu.
I don't see any list of servers to connect to.  There is just the usual list of remote libraries and I can connect to them, but that loads the remote library.  I don't see any options for "downloading" the library.

Please clarify.

What I am trying to accomplish:  I want to download and install the server library onto the client, including all the custom views and fields, without changing my client networking settings.  I do NOT want to download any of the music files since the client already has them stored on a local external USB drive and they already exactly match the music files on the server.

Old Solution:  Restore a server library backup on the client.  This mostly works, but has the unfortunate side effect of giving the client the same network ID as the server.  To resolve, I end up re-registering the server to give it a new network identity and then everybody plays nicely together, with the client taking on the old server network ID!  (BTW, I first tried re-registering the client, but that never fixed the network identity problem.) [see update in my Reply #13 below]

Equally painful old solution: Mess around with copying views between machines, as in
C:\Users\xxxx\AppData\Roaming\J River\Media Center 32\Library\Saved Views
and then ...Custom View... > Load a view from file... for every view. 

Will the new tool improve the situation?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: NEW: Copy Library and Files from Server
« Reply #4 on: January 24, 2024, 02:59:02 pm »

Sorry, but I just don't understand how to use this tool.

I'm on a Windows client and click File > Library.  This opens the attached popup menu.
I don't see any list of servers to connect to.  There is just the usual list of remote libraries and I can connect to them, but that loads the remote library.  I don't see any options for "downloading" the library.
Connect to a remote library there.

Then you'll see the option to "Copy Library and Files from Server". 
Quote
Please clarify.

What I am trying to accomplish:  I want to download and install the server library onto the client, including all the custom views and fields, without changing my client networking settings.  I do NOT want to download any of the music files since the client already has them stored on a local external USB drive and they already exactly match the music files on the server.
We might be able to make it do that, but currently, it transfers both Library and Files.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #5 on: January 24, 2024, 03:55:15 pm »

Connect to a remote library there.

Then you'll see the option to "Copy Library and Files from Server".
But so far I have never seen that option.  Proceeding to load a library from the server I only see what is shown in the attachments.  Is there another step or am I missing something here?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: NEW: Copy Library and Files from Server
« Reply #6 on: January 24, 2024, 04:26:09 pm »

Look in the File menu.
Logged
Matt Ashland, JRiver Media Center

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #7 on: January 24, 2024, 05:41:23 pm »

I'm just not seeing "Copy Library and Files from Server" anywhere at any point.  Not in the screenshots I posted and not in the File menu, before or after loading a local or remote library.

Win 11 Pro (server) | Win 10 Home (client)      MC 32.0.7
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: NEW: Copy Library and Files from Server
« Reply #8 on: January 25, 2024, 08:20:13 am »

Load a remote library, then File > Copy Database & Files From Server...  It's the sixth one down in the File menu.

Make sure you're using the latest copy of MC.
Logged
Matt Ashland, JRiver Media Center

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #9 on: January 25, 2024, 12:30:04 pm »

Load a remote library, then File > Copy Database & Files From Server...  It's the sixth one down in the File menu.

Make sure you're using the latest copy of MC.
Installed 32.0.8 (current latest beta) on both server and client, and loaded remote library from the server onto client.
I still do not see that File menu item.  The sixth one down in the File menu is "Print Images..."
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: NEW: Copy Library and Files from Server
« Reply #10 on: January 25, 2024, 12:40:51 pm »

The menu item should show up on the client.  I just load my local Id which is a library server.  The menu item shows up.
Logged
Matt Ashland, JRiver Media Center

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #11 on: January 25, 2024, 01:35:49 pm »

Apparently my client's view of the server was in some weird state, possibly due to renaming stuff after I restored the client's library from a server backup.  Rebooting did not fix it.

On the client, I just deleted the server (under Tree > Playing Now > Playing from...) and re-added it anew.  Reload it, et voila the two new menu items appear!  :)
Sorry for all the noise, but maybe someone else will benefit. ;)

Now, in Files > Copy Database & Files From Server...:
  • If I deselect Audio, Images, and Video, but leave Data selected, do you expect it will download only the library data including custom views and fields (my goal in Reply #3)?
  • What do you expect if I deselect all 4?

Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: NEW: Copy Library and Files from Server
« Reply #12 on: January 25, 2024, 03:12:00 pm »

Along the lines of what @markf2748 was asking about, it would be really awesome if this could be used to copy only the media from one or more playlists so one could copy a subset of their library onto a system that's being used for travel.  This might allow someone to copy over just unwatched TV recordings, some of their favorite movies, favorite music, etc., but not the entire library.  I've been doing this manually on previous versions - I only have about 4TB of disk space to work with for travel, but my entire library is quite a bit larger than that.

One gotcha people might run into is some broken rules on views when the "file path" contains rule is used since the destination drive letters may be different.  This would obviously depend on the specific path that is used in the rule.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #13 on: January 25, 2024, 04:13:13 pm »

Now, in Files > Copy Database & Files From Server...:
  • If I deselect Audio, Images, and Video, but leave Data selected, do you expect it will download only the library data including custom views and fields (my goal in Reply #3)?
  • ...
As a test, I did a folder/file compare between the client's default local library folder (C:\Users\USER ID\AppData\Roaming\J River\Media Center 32\Library) and the client's newly downloaded local library folder which resulted from the quoted settings (in my test this was C:\Downloaded Media Center Library\).  The following items are missing from the newly downloaded library:

Saved Views (folder)
Settings (folder)
field (year (release)).jmd
lock.jmd
view state temporary (data).jmd
view state temporary (index).jmd

The third item "field (year (release)).jmd)" refers to a custom field which was recently deleted from the server, but is still alive on the client. Therefore this file should indeed be missing.  However I did find that some client views of the downloaded library were a little messed up.  I expect it is fallout due to the absence of this field in the newly downloaded library, while local views (which still govern the display - see below) continue to make use of this field and they partially fail when it's not found.  1/29/2024 Update: Confirmed that custom fields in the loaded server library are correctly downloaded to the client library and are included when saved as local client data by this tool.

I think the "Settings (folder)" being absent from the newly downloaded library is a good thing - it presumably means all my client settings are preserved, including the network stuff.

The most disappointing thing to me is that the "Saved Views" folder is missing from the newly downloaded library, and it does not appear to have been saved in the client's Default Library either.  That is where my custom saved views are stored on the server, and I hoped they would transfer across, but obviously they did not.  I understand that JRiver, as a policy, does not like to "impose" server views on the client for assorted reasons, and this folder's absence presumably reflects that.

Feature Request:  Please provide an option in this new tool to include the Saved Views folder in the library data download and use it to replace current views on the client (save it to the Default Library?).  That option would really make this tool a winner for me by easily copying custom views from server to client (though it may be necessary to close/reopen the server process for the views to be recognized (TBD)).  Also, I think the option would nicely address a long standing issue about server v.s. client views which has been raised in the past.
1/29/2024 Update:  View handling in this tool can be cryptic and deserves an explanation.  Apparently the latest server views are always preserved in the downloaded library's Tree properties, but most often they do not automatically show up in the Content Window tabs!!  The tabs can be updated, one-by-one, by selecting the tab and then selecting the desired view in the Tree.   It might be useful to have a RMB option in the Tree's section header (Audio > Update tabs for example) to automatically present all view tabs for that section.  For a flexible workaround, see "tip" below.

Addendum:  FYI, those two new entries in the File menu do not appear on my server's MC 32.0.8 installation... 1/27/2024  Pilot error.  The two new File menu items in fact do appear after the MC 32.0.8 server PC loads a library from a remote MC server on the network.  Just tested for remote server running MC 31.0.87 and then MC 32.0.8.  New menu items appear in both cases!  :-[

1/26/2024 Update:  Actually, the best approach for my purposes right now is to simply restore a server backup on the client with the box "[ ] Restore Settings" unchecked (conveniently, all my backups are available from the cloud).  Unchecking the box eliminates the network identities confusion which I previously encountered from restoring, while still ensuring all custom fields and views match the server.  This method works especially well in my case because I separately maintain mirrored music and image files on the client's external drive (doubles as backup).  The potential downside is that the client may miss some important settings from the server, but so far it has not been an issue for me.

1/27/2024 Update: Removed speculative comments re Default Library.  A key point is that if I backup the server's "Main Library", and restore it on the client while the client's "Main Library" is loaded, then the latter will be replaced, adding updated custom fields and views, which is exactly what I want (does not require this new tool).  The most succinct reference I found is the Wiki topic:
 https://wiki.jriver.com/index.php/Library_Backup.
This new tool has the potential to simplify the process for adding server libraries to the client (but probably not for the Main Library - needs further testing).  Note that the active library will be whichever library is currently loaded on the server (no chance to change the server library from the client side).

Tip:  When loading a library, even a local one, there is a tendency for MC to wipe out views in the Content Panel tabs, inserting "Start" views, which can be very disconcerting. The result can be "repaired" by selecting one tab at a time and then selecting the desired view in the Tree.  A quick multiple-tab fix is to make systematic use of MC's View > Load/Save View facility.  Save a set of tabs for each library, then Load the tabs as a group after future library loads (or in fact anytime thereafter).




Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #14 on: January 25, 2024, 06:29:59 pm »

... it would be really awesome if this could be used to copy only the media from one or more playlists so one could copy a subset of their library onto a system that's being used for travel.  This might allow someone to copy over just unwatched TV recordings, some of their favorite movies, favorite music, etc., but not the entire library.  I've been doing this manually on previous versions - I only have about 4TB of disk space to work with for travel, but my entire library is quite a bit larger than that.
Have you considered syncing handhelds?
https://wiki.jriver.com/index.php/Sync_Handheld
Logged

greynolds

  • Citizen of the Universe
  • *****
  • Posts: 558
Re: NEW: Copy Library and Files from Server
« Reply #15 on: January 25, 2024, 07:06:31 pm »

Have you considered syncing handhelds?
https://wiki.jriver.com/index.php/Sync_Handheld
That doesn’t accomplish what I want as it doesn’t bring the sidecar files.  I have JRiver installed on my Microsoft Surface Pro, running Windows 10.  I have a 4TB USB drive for the media files.  When I have good Internet service, I can just connect to my library at home.  But when I don’t have good Internet service, such as on a cruise, I want to have a subset of my library with me.  When possible I connect to the hotel TV with an HDMI cable and I bring along a small remote I use for Theater View control.

The method of “manually” copying the media files isn’t ideal though.  The main process of copying the files isn’t the problem as someone had posted some tips for grabbing the list of filenames from a playlist and then doing some manipulation in Excel to generate a script for copying the files.  That part works just fine once the playlist has been created.  However, I have found that JRiver doesn’t automatically make use of the metadata in the sidecar files from newly imported media files (which is what they’re treated as on the Surface).  That results in some lost tagging or extra steps.  If the sidecar file issue were taken care of, the process I’m using would probably be fine for my needs.
Logged

eltigre15

  • Recent member
  • *
  • Posts: 8
Re: NEW: Copy Library and Files from Server
« Reply #16 on: January 26, 2024, 08:11:16 am »

Question on this step:

Set the desired location for your Library database.  It can be anywhere, but not in any media file directory and preferably on a fast local drive.  It should not be on a NAS.

I have 2 JRiver clients on 2 separate workstations connected to a NAS and have always wanted when shows are watched on either for it to register as watched so there is one centralized area to keep track and it does not fragment where each client keeps track of its own views.  For this step can the library database be placed on a separate always on computer and then have those 2 JRiver clients connect to that to accomplish this?
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 818
Re: NEW: Copy Library and Files from Server
« Reply #17 on: January 29, 2024, 10:44:31 pm »

I have 2 JRiver clients on 2 separate workstations connected to a NAS and have always wanted when shows are watched on either for it to register as watched so there is one centralized area to keep track and it does not fragment where each client keeps track of its own views.  For this step can the library database be placed on a separate always on computer and then have those 2 JRiver clients connect to that to accomplish this?
It appears you are inquiring about multiple clients sharing the same database files in real time, without a server-client relationship.  That is an interesting question.  I suspect it is not possible, or at least not advisable (per Jim's warning).  There might be access time or collision / file-lock issues, for example.  However two clients "Playing from" the same networked MC server and effectively sharing the server's database works nicely, as I describe in the remainder of this reply.

Optional:  Do a MC backup of the Main Library on all three computers.  Then take one of the those backups and restore it as the Main Library on the two other computers, so all three are really "on the same page".  Do the restores with the box "[ ] Restore Settings" unchecked.  Clean up the Playing Now > Playing from entries as appropriate.

I don's see a compelling need to use this new tool here.  If necessary, under Playing Now > Playing from, add the current Server library to each of the two clients.  Then Load that server library onto each client.

My tests were for Audio only.  I used a view with Sort By > Custom > Last Played (album) (z-a).  A view based on "Last Played" should also work.  The server was connected to a local USB SSD drive with the music files, both clients had their own local local mirrored music drives, but your NAS should be OK if it is well-behaved.  All my computers connected by Wi-Fi. 

For real time updates, most of the time I had to refresh whatever display I was in front of (<F5> key or the "circle arrow" refresh button just to the left of the tabs). Sometimes there is a delay in the update (order of a minute or two) on the "non-requesting" computers, not sure why.  Hopefully that's tolerable in your use case.  No need to refresh the server first, just refresh whatever computer you are viewing.

In one test the two clients were playing different albums simultaneously, so the last played album kept swapping to keep up and was observed to be the same on all three computers!

Reference:  Wiki page Media Server, section Access from another PC on your LAN.

1/30/2024: Updated with clarifications.
1/31/2024: Expanded my response under the quote.

 
Logged

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 494
Re: NEW: Copy Library and Files from Server
« Reply #18 on: February 25, 2024, 01:30:44 pm »

just discovered this. seems its very cool!

silly question, does it do the delta each time (ie sync) or do I have to copy the entire library each time the main/server library is changed and albums are added to it?

best

Z
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: NEW: Copy Library and Files from Server
« Reply #19 on: February 25, 2024, 04:47:07 pm »

Its purpose is to do a one time transfer of files and library.  If you want to keep two libraries in sync, you can use Library Server (with authentication set on the server).
Logged

rbmjr

  • World Citizen
  • ***
  • Posts: 124
Re: NEW: Copy Library and Files from Server
« Reply #20 on: March 22, 2024, 11:05:10 am »

Will this be coming to the Id soon?
Logged
Pages: [1]   Go Up