INTERACT FORUM

Please login or register.

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

Author Topic: Moving Mac Library to Linux  (Read 2729 times)

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 63
Moving Mac Library to Linux
« on: June 15, 2019, 05:43:42 pm »

I might be only one who ever needs this, but in case anyone else does, or in case I ever forget how I did this, here is how I have  apparently successfully moved a Mac MediaCenter library to Linux Mint, and then again later did same from Mac to Ubuntu. This is probably all or mostly here in forum across different posts going Mac-Windows or Windows-Mac, but seems simpler going Mac-Ubuntu as Windows has file name restrictions and maximum file path length issue that are not really issues going Mac-Linux, and Mac and Linux both use "/" in paths instead of "\" like on Windows. I assume this would work the same in reverse (going from Ubuntu to Mac). Not sure if mount point path naming of local volume ("/media/" etc) will differ with non-Debian distros.

Pardon the formatting of these instructions. I am not a coder and also I had 85% of this whole thing written & ready to post when my browser decided to back me out of the page and lose everything so I here I go again.

Step Zero: Copy the entire contents of music collection that JRiver on MacOS has been accessing (unless you are simply moving hard disk from Mac to Linux; then these instructions are same except you are physically moving external disk to Linux machine instead of pointing to a copy).

 - you will need to mount a disk with a complete current backup of music collection so everything will be where JRiver on Linux will be looking.

Let's say your music collection is on an HFS+ formatted drive for use on Mac, on a disk called "ExternalDisk" in a folder named "MusicFolder" and let's say you copied it all over to a NTFS or Ext4 volume for use in Linux.

So, on Mac that path appears as

/Volumes/ExternalDisk/MusicFolder/

& mounted in Linux, it shows as:

/media/[username]/ExternalDisk/MusicFolder/


Step One : Backup current MacOS JRiver library & restore to Linux

  - on Mac, run the
    File> Library> Backup Library
    feature, and save the resultant zip archive

Step Two ;
get the backed up library ZIP archive over to your Linux machine, and run the
    File> Library> Restore Library
    feature, and select the zip archive you just saved
   ** be sure to select both "Restore library and playlists" and "Restore Settings" - this will bring in everything: playlists, play counts, settings like your chosen "skin," etc.

- you will get message to restart MC to assure all settings are applied. So, quit MC

Step Three: Correct path throughout library.

- relaunch your Linux MediaCenter
- you will see if you hover over a music file showing in your library, it is still pointing to Mac path
- in "Audio> files" view at left tab of MediaCenter, select ALL the files!
- now use the feature: Tools> Library Tools> Rename, Move, & Copy Files
- this is critical: at top, select from dropdown this option: "Update database to point to new location (no file rename, move, or copy)"
- at bottom, check "Find & Replace"
- do not check "convert Windows File Path Syntax to Mac/Linux" because you ain't been using Windows
- I left on "replace slashes in expressions" but really do not know if I needed to...
- in "Find What" field, enter Mac path, ie: /Volumes/ExternalDisk/MusicFolder/
- in "Replace With" field, enter Ubuntu path, ie: /media/[username]/ExternalDisk/MusicFolder/

Now you will see when you hover over a song in your library view it shows the location on your mounted hard drive in Linux! You can right-click on song and choose "Locate> on external disk" and MediaCenter will take you to your song file on mounted volume within your file manager.

If, like me, you ever added a "file path" custom view to your library, you will need to also change the Mac path there to point to the new Linux path.

Step Four:

We are not quite done yet. Here is the - if you have a billion song files - slow step.

Even though your entire migrated library and its contents are now available, you need to point your auto import to your newly mounted disk; otherwise it will be still looking for songs in Mac path and no new songs will be imported going forward.

First, if like me you take advantage of MediaCenter's great feature where you can change tags in MC without saving those changes to the associated files (so as not have to rewrite files and any backups you have each time you assign an "Album Artist" or something...), be sure under "Edit" menu at top of MediaCenter, you do NOT have "Update tags when file info changes" selected (this also appears within Tools> Options> General) and be sure in this next step to de-select the default "task" selection to "update for external changes" or else these tags you spent your life modifying within MediaCenter will be overwritten when MC decides to update to "match external changes." T

  - Okay, so, go to
     File> Library> Import
and choose:
     Configure Auto Import

**** IF you edit tags in MediaCenter without writing those tags to the files themselves, then be sure in "tasks" at bottom to uncheck the selection to "update for external changes" or you will lose those edits. ****

**** IF you want MediaCenter to instead read the tags you may have changed within the files, and disregard any tag edits you made only within your library, then be sure in "tasks" at bottom to leave the selection to "update for external changes" checked. ****

You will at top, in "Folders" window, see the old Mac path is still here from whenever you set up your Mac library, assuming you use the auto import feature. So, select "Edit" and replace the Mac path  -  ie: /Volumes/ExternalDisk/MusicFolder/ - with the Linux path - ie: /media/[username]/ExternalDisk/MusicFolder/

Hit "Finish" and go do your laundry like I should be doing, or take a walk, run errands, whatever - this will take time if you have a large library, but will not ( I don't think! ) duplicate files.

It will "add" all your files you already see (& also add an new files that your library may have previously missed for whatever reason), it will "fix broken links," it will, regardless of your "tasks" selection, do the "updating library to match external changes...." mentioned above - but, from the small sample size I checked within my large library, with "update for external changes" unchecked MediaCenter will not overwrite tags which you have modified within the library which differ from external / file tags. Be patient. Do NOT quit MC or skip ahead. Do NOT quit MC until this is all done!

You will see summary of what has been imported. This will include what was fixed, skipped or failed, may be same as what happened when  you first ran import on your Mac. You can click "Details" and copy the text and save into a text document for future reference if you want.

Step Five - probably not needed:

Just maybe, the old Mac path might still remain in at least one place. If you go back to "Audio> files" view at left tab of MediaCenter, you might see you have two "locations" under "All Locations." This did not happen to me except when I stopped the process in middle just to see what might occur - because I think it happened last time I did this. Close up the  "All Locations" drop down and you will see both "/media" which you want to keep, and "/Volumes" which is no longer pertinent, as it is the old Mac path. If some folders and files are showing under this "/Volumes" dropdown, then those files were probably missed. Select everything showing there, and repeat the "Tools> Library Tools> Rename, Move, & Copy Files" process from Step Two" above. Then, once  "/Volumes" in this "Audio> files" view is empty, you can right click on "/Volumes" in this "Audio> files" view and you can now choose to delete "/Volumes". If nothing was showing under this dropdown, you can just right click on "/Volumes" in this "Audio> files" view and you can now choose to delete "/Volumes" from this "Audio> files" view.

Well, I don't know that this will be flawless. But, this is most thorough migration method I have managed.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Moving Mac Library to Linux
« Reply #1 on: June 15, 2019, 05:48:42 pm »

Thanks for sharing your notes.
Logged

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 63
Re: Moving Mac Library to Linux
« Reply #2 on: June 17, 2019, 12:44:55 am »

(Thanks Jim)

 - original post edited 6/16/2019 & 6/22/2019 as pertains to whether tags saved to library but not written to media files can actually be migrated.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Moving Mac Library to Linux
« Reply #3 on: August 21, 2019, 04:30:22 pm »

I would suggest that anyone doing this turn off Auto Import before doing the backup in Step 1. Untick "Options> Libraries & Folders > Auto-Import > Run auto-import in background".

That will stop Auto Import running immediately after the Library Restore and potentially, depending on settings, starting to fix broken links before you fix the path to the files.

Turn Auto Import back on once you have reconfigured it.
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

Library Eye

  • Junior Woodchuck
  • **
  • Posts: 63
Re: Moving Mac Library to Linux
« Reply #4 on: November 24, 2019, 01:04:23 pm »

I would suggest that anyone doing this turn off Auto Import before doing the backup in Step 1. Untick "Options> Libraries & Folders > Auto-Import > Run auto-import in background".

That will stop Auto Import running immediately after the Library Restore and potentially, depending on settings, starting to fix broken links before you fix the path to the files.

Turn Auto Import back on once you have reconfigured it.

- thanks RoderickGI for pointing this out
Logged
Pages: [1]   Go Up