Jump to content

How to move Library location


Recommended Posts

mw420blazeit
Posted

Currently I have a library setup at said location
image.png.917ddfa6c1f1f27c5222d3fe8776fe0d.png
I've copied all the contents of /mnt/g/ANIME to a separate location and would like to move my Emby library to that location
how do I do that without losing my metadata as I've uploaded some cover photos myself which look better than one's available on the internet

Happy2Play
Posted (edited)

If you are not saving nfo and images with media then you would have to shut down Emby and manually update Path for this library and items, and maybe other columns depending on your setup.

Similar to this as it is a little dated, as TypedBaseItems is obsolete.

 

Edited by Happy2Play
mw420blazeit
Posted

There should be an easier way of doing this as emby stores metadata separately
I have copied everything from my original directory to the newer directory so everything is identical

 

mw420blazeit
Posted

I did everything which was mentioned in this thread 

9 hours ago, Happy2Play said:

If you are not saving nfo and images with media then you would have to shut down Emby and manually update Path for this library and items, and maybe other columns depending on your setup.

Similar to this as it is a little dated, as TypedBaseItems is obsolete.

 

everything was working  as intended and i was happy
but emby started scanning the library on its own and decided that all the metadata needs to be deleted 
image.thumb.png.e3df64b94524e3a6820ffa84657e4eb9.png

Happy2Play
Posted

Correct as all the database entries have moved so they are now no longer valid and re-added from the new location.

If you have nfo and images with media then you have nothing to worry about.  Otherwise you have to do what I said above.

  • 1 year later...
misterious
Posted

I found myself in the same boat too. However, the mishap is even worse for me, all the items in each library are deleted each time I initiate a full library scan after changing library paths

GrimReaper
Posted
24 minutes ago, misterious said:

I found myself in the same boat too. However, the mishap is even worse for me, all the items in each library are deleted each time I initiate a full library scan after changing library paths

Are you waiting for library scan to compete? As said:

On 11/21/2021 at 8:17 AM, Happy2Play said:

Correct as all the database entries have moved so they are now no longer valid and re-added from the new location.

If you changed library paths, all the existing items will be removed and then re-added on Library scan, that is normal procedure unless you're hacking db. 

misterious
Posted
44 minutes ago, GrimReaper said:

Are you waiting for library scan to compete? As said:

If you changed library paths, all the existing items will be removed and then re-added on Library scan, that is normal procedure unless you're hacking db. 

Hack as in manually editing library.db? Yes, I only updated Path column of MediaItems table, I have metadata stored in default separate location, so I skipped editing Images column. To clarify, I can perform single library scan just fine, when I perform library scan, the items from each library are completely removed without a single trace left, luckily I have backup of /var/lib/emby

GrimReaper
Posted

Is your server log throwing any errors? 

Have you read through above linked topic, as number of issues there sound somewhat similar? 

On 11/20/2021 at 10:14 PM, Happy2Play said:

 

 

 

misterious
Posted
52 minutes ago, GrimReaper said:

Is your server log throwing any errors? 

Have you read through above linked topic, as number of issues there sound somewhat similar? 

 

Yes I did, sorry, I meant item deletion would only happen when I do Full library scan

Posted
11 hours ago, misterious said:

I found myself in the same boat too. However, the mishap is even worse for me, all the items in each library are deleted each time I initiate a full library scan after changing library paths

Right, this isn't officially supported. We'd like to support it, but we're not there just yet. So I would just be aware of that.

  • 4 weeks later...
scb99
Posted (edited)

@misterious, as well as fixing up library.db and copying over the metadata, you need to copy over the contents of emby/root/default, and also update any paths in the options

By the way, if you look at library.db, you will see that each library has a parent ID of  2 which is indeed this path (and the paths have a parent ID of 1 which is the RootFolder, which I guess is how "." is interpreted)

Good luck!

Edited by scb99
  • 1 year later...
Posted (edited)
On 5/8/2023 at 8:50 PM, scb99 said:

@misterious, as well as fixing up library.db and copying over the metadata, you need to copy over the contents of emby/root/default, and also update any paths in the options

By the way, if you look at library.db, you will see that each library has a parent ID of  2 which is indeed this path (and the paths have a parent ID of 1 which is the RootFolder, which I guess is how "." is interpreted)

Good luck!

This sounds as if this method has worked for you successfully?
I am having the same problem right now. 
I made a database with a lots of custom information and metadata and posters and images and descriptions which took me really a long time. 
Losing all this labor now because i want to change the directory is really a bummer. 😟
I would be even happy with the option to manually import&export the metadata (including images and custom texts) of a certain mediaitem (movie or show).
This would also take some time but matching up manually all those things where there is no metadata for it in the net would honestly take weeks.

Edited by Suliamu
  • Thanks 1
Posted (edited)

Addendum: 

I was unsure what exactly to do and i tried the following with a test library (movies): 
I added another path to this library with exact the same content and did the scan. 
The result was, as expected, that i then had _two versions_ of the same content in this library.
Basically as another item with another cover again. I would have to update metadata manually. But i was ok with it, at least i can copy stuff around in the emby-interface easily.   
I thought with shows it would function the same way but i am now into a (long) scan of my shows-library, and it hasn't finished yet, but what i see now is following:
There is no double entries of shows.
Also no double entries for seasons. 
Also no double entries for episodes. 
If i open up a specific episode it shows "two versions" of the same file with exactly the same filename that can be chosen in a dropdown-field. 
Metadata stayed the same. The custom images i chose are the same. 
The descriptions and tags stayed the same.
Watch history stayed the same.
My hope is that after the scan is finished i can then through normal UI remove the old path, wait for automatic scan to finish, and it will detect that those versions of the 'old library' are no longer there, and it will keep only the "new versions" and all the metadata. 

This would mean, at least for shows, a pretty frictionless migration to another library-content path. And everything stays online/available during the process.  
Just takes some time.

Edited by Suliamu
  • Like 2
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...