INTERACT FORUM

Please login or register.

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

Author Topic: Change library network address without losing statistics?  (Read 1658 times)

Steviewunda

  • Junior Woodchuck
  • **
  • Posts: 63
Change library network address without losing statistics?
« on: November 18, 2022, 01:28:50 pm »

Hi - I want to change the network address of my library contents without losing statistics such as 'Date Imported', 'Date Played', 'Number of Plays', etc. I currently have my media files on an Unraid server, and I have JRiver MC installed on a separate Win 11 PC. Library contents are linked through mapped drives eg M:\ links to a share on the Unraid server (\\TOWER\Media\Movies). I would like to use the IP address in the mapped drive (eg \\192.168.51.50\Media\Movies) as this would force JRiver to use the 10GB connection instead of the 1GB connection (according to SpaceInvader One in a Youtube 'networking in Unraid' tutorial at https://www.youtube.com/watch?v=xzbDn-kbJTQ&t=88s).

Is this correct, and is there a way to change the format of my mapped drives as described without losing my statistics when JRiver re-imports my media files into the library?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Change library network address without losing statistics?
« Reply #1 on: November 18, 2022, 01:47:11 pm »

You can do it for sure, but you don't want to reimport the files or you'll lose the stats.  Here's how to keep your stats and make the change without reimporting.  Step one is to back up your library before you change anything!  That way you can revert if you need to.  Step two is to turn off auto-import/import files in the background, etc.  That step is very important so that the library doesn't accidentally remove missing files if the files are no longer available at their original mapped drive address during the transition. 

Once you've done those two things make the changes necessary to Windows or your NAS to make your files accessible via IP/UNC path, etc.  Then select a small handful of files in MC (not all of your files!).  Once you've made a selection, right click, and in the context menu open Library Tools-->Rename, Move, & Copy Files.  This will open a dialog box.  In the upper left hand corner change the setting to "Update database to point to new location."  As long as you only use the "update" option of the rename, copy, move tool, MC will leave your files alone and just make changes to the database (which you backed up at step one). But be careful, because if you accidentally use the rename option instead of the update option you might wind up moving your files around in ways you don't want.  Rename, Move, and Copy Files is a powerful tool, so check everything carefully before you execute!

For your specific case, once you've picked "update" in the upper left, you'll want to use the find and replace tool in the lower left corner to swap out the mapped drive address to the IP prefix (i.e. replace M:\ with \\192.168.51.50\ or whatever).  Then once you're happy with how the find and replace preview looks, execute the rename.  The old library entries for the small selection of files you chose should now point to the new location and you should keep all of your stats and be able to play the files.  If everything works just right with the small sample, you can then do this same process for all of your files at once.  If it didn't work just right with the small sample, restore your library from backup and try to figure out what went wrong. 
Logged

Steviewunda

  • Junior Woodchuck
  • **
  • Posts: 63
Re: Change library network address without losing statistics?
« Reply #2 on: November 18, 2022, 01:54:00 pm »

Fantastic! Thanks for the speedy and detailed response  ;D
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #3 on: November 18, 2022, 04:21:17 pm »

Uh... Do you have a 10gbps network card in your PC? I just fast-skipped the video, but I didn't get any mention of the 10 gbps thing. Can you provide a timestamp?

It doesn't make sense to use an IP to get a faster speed. The name resolves to an IP anyway - if the target device has 2 NICs with different speeds, just plug the cable to the faster one. If you're connected to both for some reason (you shouldn't) and the name is resolving to the IP of the slowest one, you just need to add an entry to your HOSTS file to force the name resolution to the IP you desire. Either way there's no need to use the IP address instead of the name. And of course you still need a 10Gbps card on your PC and on TOWER, and all switches/routers on the connection path also need to be 10Gbps.

To clarify: when you access M: Windows knows you are accessing \\TOWER\Media\Movies. It then figures out the IP address that corresponds to TOWER, and resolves it to 192.168.51.50 (if not, you can force it). Then it just connects to that IP address and accesses \Media\Movies on it. Accessing it with \\192.168.51.50\Media\Movies cannot magically change the speed of the interface.

You can test what IP address windows is using by simply doing a "ping TOWER".
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #4 on: November 19, 2022, 03:12:31 pm »

After reading this post I think I've done a BIG mistake. I did move my files from and old drive to a new one. I move those files from inside of MC. But I didn't realise that doing this I will lose all the data from those files. Now most of my files which are moved have no more data's. I've tried to restore older backup but nothing have change. It still are without data. Now to move the data back to the previous position is quite impossible.
Anybody with more experience can give me a hand.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Change library network address without losing statistics?
« Reply #5 on: November 19, 2022, 03:39:10 pm »

Try using the Library Tools to update the library from the file properties (tag).  Try a few first.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #6 on: November 19, 2022, 04:06:52 pm »

This is what I'm trying to do now. To redo whatever wrong I've done to my files. I did import some old backup but the thing is the files are moved already, and when I'm trying to do the restore and move them with F6, nothing is happening. And because now the folder where the files are in, is to big and MC stuck on reading them. I've manage to do the restore for some of the files but in a small manner. Now doing in bulk is killing me. I hope I will manage to redo what I've done or I will go crazy...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #7 on: November 19, 2022, 04:09:55 pm »

This should be a different thread.
SkGe, did you move your files to a new disk while preserving the entire folder structure, or did you reorganize while copying?
If you preserved the folder structure you might fix things in MC just by using F6 tool to change the path prefix of all files.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #8 on: November 19, 2022, 04:22:08 pm »

@Zybex. I did move the folders from MC, and then MC moved the folders in the new path. Now I'm trying to restore from an old backup and use F6. I didn't change anything (partially some was renamed till I realise the mistake), but that was after the MC moved the folder as it was. Now checking inside the folder most of my data are gone...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #9 on: November 19, 2022, 04:25:34 pm »

You mean the audio/video files themselves, or the metadata in MC?
If the folders are empty, then the files were likely moved somewhere else. Finding them would be the first step :)
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #10 on: November 19, 2022, 04:33:51 pm »

The way it was done, was from MC explorer. I drag the folder from one hard to another hard. But I didn't realise doing this MC will not read the data because it had another path. Now everything I've moved, or everything I've check doesn't have any data anymore. I tested on a small folder and I manage the restore the data, but when I moved on bigger folders everything is haywire...
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #11 on: November 19, 2022, 05:31:35 pm »

That's salvageable.
Restore a backup to before you moved the files.
Disable Auto-Import
Use F6 to change all paths from F:\Audio\Music (or whatever you had) to H:\Music\Disk (or whatever you have now). There's an option in the tool to only change the paths but don't actually move any files.

If the change was just a copy from a drive to another (like E: to F:) and all folder paths are actually still the same, then you can fix it by just renaming the drive letter for your new disk to be the same as the old disk was.

This is a common issue, you can search for other posts to find more details on fixing it.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #12 on: November 20, 2022, 01:38:50 am »

After a few hours to deal with this mistake I've decide to move the files back on the old drives, restore the backup before all the changes I made and then try to move with rename tool.

Hope this is will return to the previous state (fingers crossed).  If not I will have more headaches. But the next problem is that having my files on two different driver, when I moved them in one drive now they are merged and I don't know which belong to one drive and the other. I've made a big mistake not knowing what it will be after...
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Change library network address without losing statistics?
« Reply #14 on: November 20, 2022, 08:14:51 am »

You should try this:

That's salvageable.
Restore a backup to before you moved the files.
Disable Auto-Import
Use F6 to change all paths from F:\Audio\Music (or whatever you had) to H:\Music\Disk (or whatever you have now). There's an option in the tool to only change the paths but don't actually move any files.

If the change was just a copy from a drive to another (like E: to F:) and all folder paths are actually still the same, then you can fix it by just renaming the drive letter for your new disk to be the same as the old disk was.

This is a common issue, you can search for other posts to find more details on fixing it.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #15 on: November 20, 2022, 11:53:37 am »

I already copy back my files on the old drive and I will see what I will be able to recover from my rookie mistake. But moving hundreds of gigas it taking time so to morrow I will see what is the result.
Thanks for the suppport.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #16 on: November 21, 2022, 03:46:37 pm »

Update after my rookie mistake. I've copy back to the old drive my files. Now I have to do some checks to see if my data are back. It seems that for now some of them have already data. But because now I have double files one on a driver and the other one copy back on the old driver, some of the files on one drive have the data but the other copy it doesn't. Now before I will do any mistake is a quick fix for this or I have to check every file and then overwrite the one without any data?
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #17 on: November 23, 2022, 07:06:31 am »

It's a way in MC to find which is imported or not? I'm still struggling to redo all my mistakes with moving files. Is a quite a heavy task to see which file have data and what not. When using smartlist to pint point the one's without any data is not helping me. MC doesn't add all the files, but only the one are imported.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #18 on: November 23, 2022, 09:40:18 am »

You're not doing it right. You should restore a backup, NOT reimport.

The tags/metadata are in the MC Database which you restore, NOT in the files themselves (it can also be saved to the files themselves, but that doesn't matter here). If you put back all the files where they were and then restore a backup from before you moved them, everything should become exactly as you had before.

After restore, you can simply open the Audio->Files view (or Video->Files) and see if the Name/Artist/Album/Year/Track/etc columns are fully populated.
Logged

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Change library network address without losing statistics?
« Reply #19 on: November 23, 2022, 09:57:52 am »

I didn't imported anything back. I just copy the files back to the old drive and restore one of the backup. Now I have two set of files. And when checking one or another, some of them have stats but the others don't, which mean the one with no stats don't belong in the library and should be removed. Now if I want to do a bulk method and to remove the one's which is not in library or to overwrite the one's which don't have any stats I need to know which is in library. The only way I see is on MC explorer mode where I can select "files in library" or "files not in library". If I try to do over the smartlist is not show all of them, probably is not seeing them on library. I want to make sure before doing something, that is not a problem again.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Change library network address without losing statistics?
« Reply #20 on: November 23, 2022, 10:34:46 am »

You can do a search for the drive letter, and probably see the sets of files separately. If so, you can delete one. Try a few first. Check your work.

But zybex is correct. You can trust his advice.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2618
Re: Change library network address without losing statistics?
« Reply #21 on: November 23, 2022, 12:30:32 pm »

I didn't imported anything back. I just copy the files back to the old drive and restore one of the backup. Now I have two set of files. And when checking one or another, some of them have stats but the others don't, which mean the one with no stats don't belong in the library and should be removed.
If you see 2 sets of files after restoring a backup, then that backup is already bad. Try restoring an older one. Immediately after restoring you should disable auto-import to prevent it from importing other files.

Quote
Now if I want to do a bulk method and to remove the one's which is not in library or to overwrite the one's which don't have any stats I need to know which is in library.
ALL files shown in MC are in the library (database) by definition. They may or may not point to a real file on your disk.
Logged
Pages: [1]   Go Up