INTERACT FORUM

Please login or register.

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

Author Topic: Library backup - mutiple libraries scenario  (Read 1162 times)

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 772
Library backup - mutiple libraries scenario
« on: September 29, 2018, 09:55:57 pm »

So I have a few questions. We're talking libraries and libraries files (.jmd, etc) not actually audio, video, etc files.  And sure, I could've tested this empirically at my end but I'm reluctant to mess with my libraries back and forth and have n versions and multiple MC installs. Hoping that somebody has more wisdom on the topic.

Case in hand: the original library, the one that MC creates the first time around on a fresh install we'll call it the main library (and in my case, it hosts Audio files and some photo files associated with audio). I've also made a number of other libraries, with dedicated locations of my choosing, to store their files (all the .jmd and xml files).

So, two questions: 1) if I back up the main library, what happens to the other libraries? Will MC _not_ do anything about them; not save anything pertaining to their existence, and therefore I need to make multiple backups, one for each, and those backups are 100% independent of one another? (that is what I desire). I ask because I feel this is not the case and the restore of the main library suddenly lists the others too - and each library backup seems to "know" of the existence of the previous, others libraries, and at that point I don't know what's backed up in each library backup.

2) If the locations of other libraries are significantly different then the "main" library (say C:\JRMC_Libraries\Video\ for a library containing only video files), I back up that library, and then I delete that folder (C:\JRMC_Libraries\Video\); would a restore create all that folder structure back? Or will the libraries be restored by some automagic somewhere else (user profile folders) if the backup restore procedure can't find the original folder structure? Cause that will complicate matters.

Appreciate any insight.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Library backup - mutiple libraries scenario
« Reply #1 on: September 30, 2018, 02:01:30 am »

What you are calling the Main Library is also know in MC as the Default Library. It can't be moved and is always under the AppData directory. It can, however, be renamed to whatever you want. It also doesn't need to be the Library that you usually use. MC can be set to open the Default Library when it is started, and if it is not, it will open the previously open Library. So you can create a Library anywhere on your PC and have MC always open and use that Library, but MC will always also have a Default Library in the default location under AppData.

1)
If you back up a Library, the Library that you had loaded is backed up. None of the other Libraries are backed up or referenced in any way, other than they are listed in the settings, and therefore some information about them is stored in the Windows Registry. All libraries on a PC share the same settings, which are backed up with any Library, and Restored to the Registry when a Library Restore is done,if that option is selected.

So yes, you need to open and back up each library. MC will do automatic backups on a "regular" basis, but you can't control when that happens, so it isn't going to happen when you open each of your Libraries, say for the first time in a week. The automatic backups will happen only for the currently loaded Library, when MC thinks they are due to occur. Each Library backup ZIP file name includes the name of the Library by default, so you can tell which one they are for, even though they will all be stored in the same location, unless you manually change that location during a manual backup.

As above, the backups aren't 100% independent of each other, as they all back up and can be used to Restore a common set of settings. Otherwise, yes they are completely independent.

The Main Library, and all other Libraries on the one PC, should list all Libraries that have been created for that installation. This is required, as otherwise there isn't any way to switch Libraries. All information on what Libraries exist in the installation is stored in settings and is therefore visible in all Libraries.

2)
It works this way. Create Library A and back it up. Create Library B and back it up. Switch from Library A to B, then restore Library A. You will now have the same content in Library A and B. That is, you will have Library A under both Library names, A and B, but they will still be named A and B.

A Library Restore restores the library contents into the currently loaded Library, overwriting what was previously in that library. A Library Restore will not recreate a sub-directory structure based on where it was originally backed up from. It will load into the location of the currently loaded Library, and retain the name of the currently loaded Library.

If you backed up your Video Library, then deleted the location it used to be stored in (C:\JRMC_Libraries\Video\), then MC would have a problem, as it would think it had a Library in that location, but it couldn't find one. If you try to load the Library that you have deleted the sub-directory for, MC will re-create the original sub-directory for that Library, and create an empty Library "stub" consisting of six files, and then build more of the Library as required, when you start to use it.

In order to restore the Library again to its original location you would need to switch to that Library, then run the Restore. So if you deleted the sub-directory, switched to that Library again which re-created the sub-directory and a stub Library, then the Restore would overwrite that stub Library.

If you want to delete a Library permanently so that MC no longer knows about it, do it from within MC. But note that you cannot delete the Main/Default Library.



However, do you have a good reason for having multiple Libraries?

Most people use one Library, and then use MC's capabilities, specifically Views, to separate different types of content, as was intended and how MC is designed to be used. There are very few valid reasons for having multiple Libraries. I have just one real Library, and a few test Libraries on my Workstation, which is also a Client of my HTPC. My HTPC has just one Library, but includes all Audio, Video, Image, and Television media that my HTPC can access.

Some people have argued that they need multiple Libraries, but usually, their reasons aren't valid and are more often related to the way they have traditionally used Media software, or some personal preference, or some misunderstanding of how MC works.

If you had just one Library, none of the above issues would occur. A search of the forum will find multiple discussions about using multiple Libraries, rather than one with appropriate Views.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 772
Re: Library backup - mutiple libraries scenario
« Reply #2 on: September 30, 2018, 06:18:26 pm »

Roderick,

In the back of my head I knew, subliminally, that what happens is along the steps you took the time to write (thanks). But even so, just reading this is mind-numbing. It's clear the library backups are not 100% self-contained. That can lead to a number of problems; what if I don't back them all up at the same time? What if some library backups "know" about other libraries, while other backups don't (because the other libraries we're created yet)? The order to restore what-where is rather painful. One migrates from one version of MC to another and "hey, I need a day for this whole carousel; maybe a weekend"

Couple with the fact that if one customizes the location of the libraries (sidenote: I dislike everything that Windows spoon-feeds, since day one; Documents, Downloads, Photos, automatically stored stuff in a user profile that can be wiped, anything that made the world dependent on these symlinks, and made people forget where the real files are), and one runs into problems. Why can't it be more robust - restore everything to the letter (throw an error if stuff is really missing, say, the original drive letter), and completely isolated?

I'm guessing there's too small a number of users that venture into multiple libraries scenarios to drive the point home. Which gets us to why multiple libraries - and I knew that question was coming.

Let's say you add, or had external changes, for 5 to 10 CDs. More than you'd be inclined to hunt them down manually in an all encompassing library, but small numbers otherwise. Just enough to do a "Run Auto-Import now".
I have +300,000 pictures, tv episodes in the 5 digits and so on (on a network). As fast as MC is, do you know how long it takes to check all that just because I added 5-10 CDs? You go get a couple of beers! You want to do a few passes like that because multiple edits? Get the whole six pack. So. Multiple libraries.

And while I don't like to presume, I'm preempting here the question "why run auto-import, MC should detect changes, etc". Mmm, I'd say that's not bullet proof (of no fault of MC; files just get stored on stuff that doesn't send proper signals). Also the tagging in MC (this is the part that may raise an eyebrow here and there so it may be better for a separate thread)... I'm not sure that it plays so well with others as people think. Can it show automatically "Encoded by"? Or MusicBrainz tags? Or proper IPTC  tags for photos? So. Manual updates, to catch/write changes in custom fields, made to compensate.

But I don't pretend to have the best organizing scheme; obviously I built some complex scaffolding through the years. My point is multiple libraries it's a pretty tricky topic and it may warrant some exploring to make it more straightforward.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Library backup - mutiple libraries scenario
« Reply #3 on: September 30, 2018, 08:10:28 pm »

Well, you asked, I explained in detailed. Sorry it is mind-numbing.  ;)

Library Backups are 100% self-contained, excluding the executables, Cover Art, Thumbnails, and a few other bits and pieces. But if your Server drive failed and was unrecoverable, then installing MC and restoring a backup to a new Server would allow you to fully recover your Library, once Cover Art was collected again and Thumbnails were built.

It is just that backups store additional information, the Settings. If you had to restore an earlier backup that didn't know about a later Library you had created, just restore the Library, and not the settings, and all would be good. MC would continue to know about all current Libraries. But then, I hope you aren't regularly creating additional libraries so that this is really an issue. I would have thought that the number of Libraries you have has been stable for some time, given the size of your collection.

Of course, I'm sure you have a real backup application that is making regular full backups of your boot drive, and any other important drives, which is more appropriate for system recovery. MC backups are more about taking a snapshot just of the Library at a point in time, to protect against short-term loss of information, perhaps when doing large maintenance tasks.


Maybe the answer to your speed issue is a very powerful Server PC with a PCIe based SSD. They are pretty fast these days. But then you still have the speed issue of the hardware the media files are stored on. But that could be addressed as well. Using a Windows Server that shares file system events rather than a NAS which does not (I think some NAS can share file system events, but not all) would mean that MC finds new files without a full Auto Import run. Things like that can improve performance issues.

But if you need multiple Libraries, then I hope my detailed explanation helps to understand what is going on, and what is possible a bit more... You may need to read it through a few times though.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Library backup - mutiple libraries scenario
« Reply #4 on: October 01, 2018, 03:12:11 am »

My point is multiple libraries it's a pretty tricky topic and it may warrant some exploring to make it more straightforward.

My gut feeling is that this is unlikely to gain much momentum simply because there are very few reasons why multiple libraries are a good idea. Just because you can doesn't mean you should.

The challenges that you have tackled by using multiple libraries may well be addressed with a change in workflow or a change in mindset. Eg improve the quality of your tagging/review your tags before got commit so you don't have to do multiple passes and re-run auto import. I make major tag changes outside MC and just run auto-import once when I'm done. It a tag needs tweaking I'll do it in MC.

You clearly have an large collection of media and that will obviously present some challenges not at least inevitable performance issues as there's a lot more of it. You can way up the pros and cons of your approaches and decide which are best, what works well and what you just have to live with. I just fear that it's unlikely they'll be (m)any changes in the way multiple libraries work as there are lots of other areas that are more pressing on developer time.

Spike

SRT

  • Recent member
  • *
  • Posts: 5
Re: Library backup - mutiple libraries scenario
« Reply #5 on: October 06, 2018, 01:47:59 pm »

Hello:

Would a mirror image backup of the system drive capture ALL MC Libraries as they are, or do some portions of them reside on the "Media Drive(s)?"

Thanks.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72549
  • Where did I put my teeth?
Re: Library backup - mutiple libraries scenario
« Reply #6 on: October 06, 2018, 05:03:04 pm »

Welcome to the forum.  Check the setting for Library Files under File Locations in Options.
Logged

SRT

  • Recent member
  • *
  • Posts: 5
Re: Library backup - mutiple libraries scenario
« Reply #7 on: October 06, 2018, 05:22:56 pm »

Okay,

I will check in that area.

Thanks!
Logged
Pages: [1]   Go Up