INTERACT FORUM

Please login or register.

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

Author Topic: Notes from moving a Windows library to Linux  (Read 5267 times)

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 687
Notes from moving a Windows library to Linux
« on: September 26, 2018, 11:03:58 am »

Posting my notes from a successful library migration. I'm using an xfce Arcolinux build of Arch Linux, on a decent spec i7 machine. My home music network includes a lot of various DLNA renderers, so my goal was to get everything running successfully on Linux.

Also, I'm fairly novice with Linux.. Bootstrapping as I go here, so bear with me...

I'm very impressed with how fast Media Center runs in Linux, and how fast Arch Linux runs in general.

Library Restore

Tried to restore library and settings (I'm an optimist). Didn't work. Biggest problem was that networking broke completely and DLNA renderers no longer appeared. I had to reinstall Media Center and delete the folder /home/[username]/.jriver to get networking back.

This worked instead:

Library restore > Check Restore library and playlists | Uncheck Restore Settings

Now all my media files and playlists appeared, just files had incorrect filepaths.

File Locations

Someone mentioned a lot of trouble with this in a recent post. Windows and Linux file paths are very different systems. I'm learning as I go here, took some work but I think this is a good repeatable solution:

First, I mounted my M:\Music and Photos SSD to /media/Big_SDD  and V:\Videos to /media/Blue_HD

Second using Rename, Move and Copy Files was a two step process:

1. Fix Linux file syntax

Select Update Database to point to new location
Check Find and Replace
Check Convert Windows File Path Syntax

Find: [M:\]
Replace with [Leave blank]

2. Fix file location:

Find: [/M - New/]
Replace with: [/media/Big_SSD/M - New/]

At this point, all my music files and all tested playlists and smartlists worked. I drank a beer to celebrate, this was a big moment.

Repeated steps for images. Worked.

Videos I had to do this process twice. Videos had home videos on my image drive, and all movies on the another drive.

At this point I had all media and playlists working in my Linux Library, 48,560 files (!). Took about an hour(ish) of work, minus some of the backpedaling.

Ok time to backup library and try autoimport.

Autoimport

Library Backup and restore works.

At first, I set up a symbolic link to my /media drive mounts so that the music folder would show as a folder in my /home/[user]/Music location. If I tell JRiver to import at the symbolic link location, two copies of the file show up in my library. In other words, JRiver doesn't distinguish between a file and the identical file path using a symbolic link (ln command). Maybe this is normal Linux stuff. In any case, be careful here or you will have tons of duplicates.

Pointing Auto import to /media/ drive mounts now:

Auto Import to Audio folder path resulted in 67 additional files imported.
Auto Import to Video folder worked.
Auto Import Images resulted in some 317 additional files imported.

I need to investigate what happened here. [Edit: I don't see duplicates on the new files. I have been using the same library since 2009, and ran into issues in the past with Windows ignoring some files on import. My guess is that they are overlooked by my Windows impor, even when set to protect missing drives, for some reason. Tricky and time consuming to troubleshoot this, everything works so I'm just leaving it be for now]

So far so good! Everything seems to play successfully. Thanks for the tremendous development efforts to make this happen.

[TBC]
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 687
Re: Notes from moving a Windows library to Linux
« Reply #1 on: September 27, 2018, 10:06:04 am »

Linux is fussy. My hope is that everything just runs after setup.

It also seems more modern, up to date, compared to Windows. Faster, leaner. That wasn't the case ten years ago.
Logged

carlismysecondname

  • Junior Woodchuck
  • **
  • Posts: 94
Re: Notes from moving a Windows library to Linux
« Reply #2 on: September 28, 2018, 04:52:05 am »

Apart from a few programs (including turbo tax), I'm pretty much satisfied with many of the available Linux distros now -- more and more viable software alternatives now exist. This was not the case back in 2010 when I tried my first flavor of Linux... It's hard to convince the masses to switch though -- in the way most of us similarly are just used to the QWERTY keyboard. Really, after 20 years of using a QWERTY style keyboard, there's little advantage in switching. Hmmm, actually I think it's much easier to jump into Linux than switching to a different keyboard layout. But it's going to take a longer while than previous predictions. A whole generation (or two) of Windows and Mac users have to die out first before Linux eventually dominates the desktop world.
Logged

laerm

  • Galactic Citizen
  • ****
  • Posts: 424
Re: Notes from moving a Windows library to Linux
« Reply #3 on: October 08, 2018, 01:33:48 am »

Hi there –

You posted in another thread a while back about issues I was having with moving a library from Windows to Linux. I've got time again to wrestle with this and have uncovered a new problem: Linux is case-sensitive, Windows is not. So I have names (bands, albums, songs) that have used lowercase for whatever reason and I have kept that syntax for tags but Windows did not reliably rename the files from Upper to lower case. So Linux is like "this is the correct filename" whereas Windows was like "ehh, close enough."

Example:

Tag: quiet band "I like small letters" relaxed album
Windows filename: Relaxed Album\Quiet Band - I Like Small Letters.mp3
Linux filename: relaxed album/quiet band - I like small letters.mp3

Do you see the problem? Any tips (short of changing all my tags and/or firing up a Windows server to redo all the filenames)? Thanks.

Micah
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 687
Re: Notes from moving a Windows library to Linux
« Reply #4 on: October 10, 2018, 07:21:27 pm »



Tag: quiet band "I like small letters" relaxed album
Windows filename: Relaxed Album\Quiet Band - I Like Small Letters.mp3
Linux filename: relaxed album/quiet band - I like small letters.mp3

Do you see the problem? Any tips (short of changing all my tags and/or firing up a Windows server to redo all the filenames)? Thanks.

Micah

Hi Micah,

I'm having trouble understanding the problem. What is the outcome you would like to achieve? In other words, do you want upper case letters in Linux, but Linux reads them as lower case? Or do you want Linux and Windows to match case?

If your tags are correct in Linux but the filename isn't, you could try using the "Update Library (from tags)" function.

If your filename is correct but tags are not, try "Fill Properties from Filename."

Both are found under Right Click => Library Tools. Try on a few files before you try on a large number, and make sure you have a backup of your library and data.

If your filename and tags are both incorrect under Linux, I'm not sure what is going on.

In any case, keep your eye on a clear outcome you would like to achieve.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient
Re: Notes from moving a Windows library to Linux
« Reply #5 on: October 11, 2018, 04:11:54 pm »

The main issue that case sensitivity introduces is when you wind up mixing windows and linux filesystems or want to use the same file system with JRiver clients on both windows and on linux.  If you commit to one or the other it's easy enough to fix, but if you use both you need to ensure that your directories are all named in a way that doesn't result in both an upper case and lower case version of the same file name.

For example, if you have a linux fileserver that has two directories: 1) Nick Cave and the Bad Seeds and 2) nick cave and the bad seeds, it will work just fine for local access.  *But* if you expose those directories as a samba/cifs share (which always uses windows conventions), you will be sad, because those directory names will "collide" and only one will be visible to the client (even if its a linux client), and half your files will be "missing" (although they will still exist on the server).  The way to fix the collision issue is to find and fix all the case variant doppelgangers on the system on which the files physically reside.  This one-liner, executed at the root of your music directory will tell you all the directories and files that are duplicated but varying only in case:
Code: [Select]
find . | sort -f | uniq -di

On the other hand, if you're not experiencing issues (i.e. if it's just an aesthetic thing), you could probably write a script that would title case everything pretty darn quick (i.e. the first answer at this link offers a pretty solid one: https://askubuntu.com/questions/589296/recursively-rename-all-files-and-folders-to-title-case-from-terminal).  You could then re-import the tags from the directory structure using library tools as drmimosa described.
Logged

danhardison

  • Recent member
  • *
  • Posts: 35
Re: Notes from moving a Windows library to Linux
« Reply #6 on: October 25, 2018, 05:37:45 pm »

Apart from a few programs (including turbo tax), I'm pretty much satisfied with many of the available Linux distros now -- more and more viable software alternatives now exist. This was not the case back in 2010 when I tried my first flavor of Linux... It's hard to convince the masses to switch though -- in the way most of us similarly are just used to the QWERTY keyboard. Really, after 20 years of using a QWERTY style keyboard, there's little advantage in switching. Hmmm, actually I think it's much easier to jump into Linux than switching to a different keyboard layout. But it's going to take a longer while than previous predictions. A whole generation (or two) of Windows and Mac users have to die out first before Linux eventually dominates the desktop world.

Amen! Linux rocks. I am a professional software developer, specialising in SQL Server and Visual Studio, so I have to use a Windows machine for that, but otherwise I'd prefer to use Linux hands down every time. There is a slight learning curve and a few more hoops to jump through when installing new software (which is a good thing I think... how many Windows machines have you seen with tons of crap installed.. and icons all over the desktop etc.. aaaarrrggg). But once it's up and running Linux is SO much stabler(?) more stable(?), and doesn't slow down over time like Windows does with registry bloat etc... Not trying to start an OS flame war... just saying. Go Linux.
Logged

carlismysecondname

  • Junior Woodchuck
  • **
  • Posts: 94
Re: Notes from moving a Windows library to Linux
« Reply #7 on: November 06, 2018, 08:53:28 pm »

I leave my linux machines running for several months at a time without me attending... sometimes just remotely checking, but that's it. It is incredidbly stable.
Logged

pinhead216

  • Member
  • *
  • Posts: 4
Re: Notes from moving a Windows library to Linux
« Reply #8 on: March 01, 2020, 05:38:13 am »

Just wanted to add 1 "todo" to this topic as I found out myself doing this migration.

The description above works quite well until you start importing new entries to your library (given that you've restored from a windows generated library). As it turns out importing new files have the "old" windows format "\" in their filename which is a problem for automated processes like "Get Movie & TV info" as the file path is wrong.

Easy way to overcome this is to manually edit the "platform.jmd" file in the active library folder.
Just replace "[Platform]=Windows" with "[Platform]=Linux" and save the file.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5162
  • "Linux Merit Badge" Recipient
Re: Notes from moving a Windows library to Linux
« Reply #9 on: March 01, 2020, 10:52:11 am »

Just wanted to add 1 "todo" to this topic as I found out myself doing this migration.

The description above works quite well until you start importing new entries to your library (given that you've restored from a windows generated library). As it turns out importing new files have the "old" windows format "\" in their filename which is a problem for automated processes like "Get Movie & TV info" as the file path is wrong.

Easy way to overcome this is to manually edit the "platform.jmd" file in the active library folder.
Just replace "[Platform]=Windows" with "[Platform]=Linux" and save the file.

Neat find!  That almost certainly explains some issues various folks have been seeing with cross-platform library transitions, such as https://yabb.jriver.com/interact/index.php/topic,123748.0.html
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Notes from moving a Windows library to Linux
« Reply #10 on: March 01, 2020, 11:26:21 am »

...
Easy way to overcome this is to manually edit the "platform.jmd" file in the active library folder.
Just replace "[Platform]=Windows" with "[Platform]=Linux" and save the file.

Thanks for posting this!
Logged

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1449
Re: Notes from moving a Windows library to Linux
« Reply #11 on: March 17, 2020, 09:50:32 am »

Just wanted to add 1 "todo" to this topic as I found out myself doing this migration.

The description above works quite well until you start importing new entries to your library (given that you've restored from a windows generated library). As it turns out importing new files have the "old" windows format "\" in their filename which is a problem for automated processes like "Get Movie & TV info" as the file path is wrong.

Easy way to overcome this is to manually edit the "platform.jmd" file in the active library folder.
Just replace "[Platform]=Windows" with "[Platform]=Linux" and save the file.

This works thx!

Can this entry be changed automatically somehow when Restoring from a Windows Library in Linux?
Everything else seems to be working fine when restoring both the library and settings from Windows..
Thx

Just one thing I noticed after making the change above and re-running the auto-import.  Auto-import says all files are being added BUT The date imported is kept and no additional folder is created.  So solution works but ignores what the first auto-import log says...
Logged
Pages: [1]   Go Up