neunghaha28 16 Posted July 28, 2021 Share Posted July 28, 2021 (edited) 1 hour ago, Luke said: https://support.emby.media/support/solutions/articles/44002210894-corrupt-database Since I have a backup database I've retested and followed the instructions @Happy2Play @Luke after scan media library poster still missing. *** Error Report *** Version: 4.7.0.3 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 4.4.180+ (root@build13) (gcc version 7.5.0 (GCC) ) #41890 SMP Fri Jun 25 02:37:14 CST 2021 Framework: .NET Core 3.1.13 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 4 Data path: /config Application path: /system System.IndexOutOfRangeException: System.IndexOutOfRangeException: Index was outside the bounds of the array. at DvdMounter.DvdMounter.Mount(ReadOnlyMemory`1 mediaPath, ReadOnlyMemory`1 container, CancellationToken cancellationToken) at Emby.Server.Implementations.IO.MediaMountManager.Mount(ReadOnlyMemory`1 mediaPath, ReadOnlyMemory`1 container, CancellationToken cancellationToken) at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: DvdMounter TargetSite: System.Threading.Tasks.Task`1[MediaBrowser.Model.IO.IMediaMount] Mount(System.ReadOnlyMemory`1[System.Char], System.ReadOnlyMemory`1[System.Char], System.Threading.CancellationToken) 2021-07-28 14:25:24.005 Info App: MovieDbProvider: Finding id for item: Scorpions: Acoustica 2021-07-28 14:25:24.005 Info HttpClient: GET https://api.themoviedb.org/3/search/movie?api_key=f6bd687ffa63cd282b6ff2c6877f2669&query=Scorpions%3A+Acoustica&language=en 2021-07-28 14:25:24.305 Info HttpClient: GET https://api.themoviedb.org/3/movie/40587?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers&language=en&include_image_language=en,null 2021-07-28 14:25:24.633 Info HttpClient: GET https://api.themoviedb.org/3/movie/40587?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers 2021-07-28 14:25:24.917 Info HttpClient: GET https://image.tmdb.org/t/p/original/5ORtzd8TGRznYZ7lieA4BGNUEei.jpg 2021-07-28 14:25:25.195 Info HttpClient: GET https://image.tmdb.org/t/p/original/jGISGWHBfmWAE4Yz4VFHaaFXzOC.jpg 2021-07-28 14:25:25.389 Info HttpClient: GET https://webservice.fanart.tv/v3/movies/40587?api_key=5c6b04c68e904cfed1e6cbc9a9e683d4&client_key=bcda32a4da9af1621653d366beb1364b 2021-07-28 14:25:25.581 Info HttpClient: GET https://assets.fanart.tv/fanart/movies/40587/hdmovieclearart/scorpions-acoustica-52df0739ef605.png 2021-07-28 14:25:26.619 Error DvdMounter: No vobs found in dvd structure. 2021-07-28 14:25:26.620 Error App: Error in ffprobe *** Error Report *** Version: 4.7.0.3 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 4.4.180+ (root@build13) (gcc version 7.5.0 (GCC) ) #41890 SMP Fri Jun 25 02:37:14 CST 2021 Framework: .NET Core 3.1.13 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 4 Data path: /config Application path: /system System.IndexOutOfRangeException: System.IndexOutOfRangeException: Index was outside the bounds of the array. at DvdMounter.DvdMounter.Mount(ReadOnlyMemory`1 mediaPath, ReadOnlyMemory`1 container, CancellationToken cancellationToken) at Emby.Server.Implementations.IO.MediaMountManager.Mount(ReadOnlyMemory`1 mediaPath, ReadOnlyMemory`1 container, CancellationToken cancellationToken) at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: DvdMounter TargetSite: System.Threading.Tasks.Task`1[MediaBrowser.Model.IO.IMediaMount] Mount(System.ReadOnlyMemory`1[System.Char], System.ReadOnlyMemory`1[System.Char], System.Threading.CancellationToken) 2021-07-28 14:25:26.620 Info App: MovieDbProvider: Finding id for item: Simon & Garfunkel: The Concert in Central Park 2021-07-28 14:25:26.620 Info HttpClient: GET https://api.themoviedb.org/3/search/movie?api_key=f6bd687ffa63cd282b6ff2c6877f2669&query=Simon+%26+Garfunkel%3A+The+Concert+in+Central+Park&language=en 2021-07-28 14:25:26.991 Info HttpClient: GET https://api.themoviedb.org/3/movie/40589?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers&language=en&include_image_language=en,null 2021-07-28 14:25:27.291 Info HttpClient: GET https://api.themoviedb.org/3/movie/40589?api_key=f6bd687ffa63cd282b6ff2c6877f2669&append_to_response=casts,releases,images,keywords,trailers 2021-07-28 14:25:27.585 Info HttpClient: GET https://image.tmdb.org/t/p/original/fszx66b55z1m1mmjgWqZrOsyeRi.jpg 2021-07-28 14:25:27.776 Info HttpClient: GET https://image.tmdb.org/ embyserver.txt Edited July 28, 2021 by neunghaha28 Link to comment Share on other sites More sharing options...
Luke 36881 Posted July 28, 2021 Share Posted July 28, 2021 At this point it's getting more difficult to help because you've likely taken steps that we haven't tried ourselves. Link to comment Share on other sites More sharing options...
neunghaha28 16 Posted July 28, 2021 Share Posted July 28, 2021 (edited) 27 minutes ago, Luke said: At this point it's getting more difficult to help because you've likely taken steps that we haven't tried ourselves. Why do you say I followed steps that you haven't tried yet? Have you looked at the embyserver.txt? It can be seen that when I scan it deletes the metadata. I followed all the steps you guys suggested. I've never had a problem like this with plex when I edit the database. I have both emby premiere and plex pass which I use both. Edited July 28, 2021 by neunghaha28 Link to comment Share on other sites More sharing options...
amb13 17 Posted November 2, 2021 Share Posted November 2, 2021 Hi, I've followed everything here as described. Library is all moved and all looks good. But when Emby scans the library again, Emby deletes the every entry and re-add them, running ffprobe again. Including deleting all images as re-downloads everything. To sum up: Until I scan the library everything is good. 1 Link to comment Share on other sites More sharing options...
Luke 36881 Posted November 2, 2021 Share Posted November 2, 2021 7 hours ago, amb13 said: Hi, I've followed everything here as described. Library is all moved and all looks good. But when Emby scans the library again, Emby deletes the every entry and re-add them, running ffprobe again. Including deleting all images as re-downloads everything. To sum up: Until I scan the library everything is good. That's only a one time process though, right? Link to comment Share on other sites More sharing options...
amb13 17 Posted November 2, 2021 Share Posted November 2, 2021 (edited) 19 minutes ago, Luke said: That's only a one time process though, right? I guess so, but then it's pretty much the same as deleting the library and adding a new one. Was hoping I could do it without having to redownload and rescan everything. Seems like a pretty simple operation to change the filepath. Other apps has no problems. Edited November 2, 2021 by amb13 Link to comment Share on other sites More sharing options...
romankk 8 Posted November 2, 2021 Share Posted November 2, 2021 3 hours ago, Luke said: That's only a one time process though, right? In my case, this would be a disaster, as I have a few thousand files and the identification of some movies is not reliable enough. I had to fix quite some identifications manually, something that I don't want to do again. It would be cool if there were an option to serialize the DB into files (nfo?) so that they can remain stable during a complete re-scan.. 1 Link to comment Share on other sites More sharing options...
trmb 2 Posted January 7, 2022 Share Posted January 7, 2022 This technique worked very well for me to move libraries on a Windows 10 box, and I've provided example sqlite code for that since these examples are all for Linux paths... in case someone is searching for a solution on this site and finds only the Linux sqlite code in this forum. On Windows I used a program called DB Browser for SQlite to make the changes with Emby Server stopped. I also edited the root/default/Movies and TV options.xml files to refer to the new directories. Worked perfectly on restart. (Probably only because I had carefully backed every file up...) Collections were preserved perfectly as well. In the long run, this means I may even switch to Linux since I should be able to preserve libraries... The only YMMV caveat I can think of is that I store movie/TV metadata files in the movie/TV folders... not sure if that would matter any longer as the library tables have been simplified. UPDATE MediaItems SET Path= replace(Path, 'T:\Shared Videos', 'M:\Media\Movies') where Path like '%T:\Shared Videos%'; UPDATE MediaStreams2 SET Path= replace(Path, 'T:\Shared Videos', 'M:\Media\Movies') where Path like '%T:\Shared Videos%'; UPDATE MediaItems SET Path= replace(Path, 'T:\TV Shows', 'M:\Media\TV') where Path like '%T:\TV Shows%'; UPDATE MediaStreams2 SET Path= replace(Path, 'T:\TV Shows', 'M:\Media\TV') where Path like '%T:\TV Shows%'; 1 Link to comment Share on other sites More sharing options...
andrewds 87 Posted October 6, 2022 Share Posted October 6, 2022 Hello: Today I've confirmed that the steps in this document work for a storage migration, tested on Windows. 1. Shut down Emby Server 2. Navigate to %AppData%\Emby-Server\programdata\root\ and create a backup copy of the default folder (call it defaultbak) 3. Manually update the library folder paths for each library in %AppData%\Emby-Server\programdata\root\default\<LIBRARY>\options.xml (PathInfos key) Old value: <PathInfos> <MediaPathInfo> <Path>V:\Movies</Path> <NetworkPath>\\8.67.5.309\video\Movies</NetworkPath> </MediaPathInfo> </PathInfos> New value: <PathInfos> <MediaPathInfo> <Path>E:\share\video\Movies</Path> <NetworkPath>\\5.55.3.455\video\Movies</NetworkPath> </MediaPathInfo> </PathInfos> 4. Navigate to %AppData%\Emby-Server\programdata\data and create a backup copy of the library.db file (call it library.db.bak) 5. Open library.db in DB Browser for SQLite or whatever you prefer. 6. MODIFY the following update statements TO MEET YOUR NEEDS for each library, changing the path as necessary. In my case my library was previously spread across two storage locations and is now combined into one so I had to update the paths for each previous location. There are several ways you can tackle this. I preferred to run the update statements per library, committing the changes to the database and verifying them before moving onto the next library. /*Update MediaItems Path*/ UPDATE MediaItems SET Path= replace(Path, 'V:\Movies', 'E:\share\video\Movies') where Path like '%V:\Movies%'; /*Update MediaItems Images*/ UPDATE MediaItems SET Images= replace(Images, 'V:\Movies', 'E:\share\video\Movies') where Images like '%V:\Movies%'; /*Update MediaStreams2 Path*/ UPDATE MediaStreams2 SET Path= replace(Path, 'V:\Movies', 'E:\share\video\Movies') where Path like '%V:\Movies%'; 7. Don't forget to commit the changes to the database before you close the database and launch emby server to verify them. 8. If something is messed up you can restore the backups you've created and start over if you prefer to try again. I recommend small changes to test/verify, it might take a little time but if you value your data then it's worth the effort. Measure twice, cut once, etc. Thanks to @dannymichel for getting this thread started, you saved me a bunch of time exploring the data model to figure out what's what. 1 2 Link to comment Share on other sites More sharing options...
andrewds 87 Posted October 7, 2022 Share Posted October 7, 2022 (edited) On 11/2/2021 at 2:55 AM, amb13 said: Hi, I've followed everything here as described. Library is all moved and all looks good. But when Emby scans the library again, Emby deletes the every entry and re-add them, running ffprobe again. Including deleting all images as re-downloads everything. To sum up: Until I scan the library everything is good. Providing an update, I am also seeing the behaviour that @amb13 is describing. The entire library was rescanned overnight and it appears all images were replaced, and all episode intros are being detected once again. So, I would say some critical step is still missing in the migration process. Until a library rescan was performed and Emby determined that for some reason everything should be rescanned it looked great. However ultimately the outcome is the same as if I had not manually performed the database/library config updates at all. edit: images were replaced, but with the custom images I'd already selected before. So some kind of data reconciliation process happening which isn't surprising when hand editing the data. Edited October 7, 2022 by andrewds correction Link to comment Share on other sites More sharing options...
Luke 36881 Posted October 7, 2022 Share Posted October 7, 2022 2 hours ago, andrewds said: Providing an update, I am also seeing the behaviour that @amb13 is describing. The entire library was rescanned overnight and it appears all images were replaced, and all episode intros are being detected once again. So, I would say some critical step is still missing in the migration process. Until a library rescan was performed and Emby determined that for some reason everything should be rescanned it looked great. However ultimately the outcome is the same as if I had not manually performed the database/library config updates at all. edit: images were replaced, but with the custom images I'd already selected before. So some kind of data reconciliation process happening which isn't surprising when hand editing the data. Hi, yes a full rescan was always going to happen. I agree that we should provide an easier way to change the location of a library without a rescan, but until that happens, I would consider the instructions here a close but imperfect workaround. 1 Link to comment Share on other sites More sharing options...
andrewds 87 Posted October 7, 2022 Share Posted October 7, 2022 (edited) Thanks @Luke for the information. Since a full rescan occurs regardless, what would you say is the benefit of using these instructions vs just updating the library folder paths through the web interface and allowing the scan to happen as it would? Edited October 7, 2022 by andrewds Link to comment Share on other sites More sharing options...
Luke 36881 Posted October 7, 2022 Share Posted October 7, 2022 Maybe it's possible that some have gotten through this without a rescan but other than that I can't think of any. But I understand that until we offer it users are still going to try and find a way to accomplish it, and there's nothing wrong with that. Link to comment Share on other sites More sharing options...
LEGEND96 2 Posted December 25, 2022 Share Posted December 25, 2022 (edited) After faffing about for a few days, I managed to get the watch data restored. Was moving from Windows to Linux so thought I'd document some of my findings here too in case there are others in the same boat. Follow the OPs post about updating the databases and the options.xml file. Do not try to migrate server configuration by the plugin and then manually transfer the library.db file to restore watch data. The users will not retain the same user IDs, leading to the wrong user getting the wrong watch history. Either go entirely by plugins (the server backup plugin + trakt) or entirely by manual transfer. Refer to here. If moving from Windows to Linux, you will need to update paths in library.db MediaItems and MediaStreams2 table, replacing all backslashes (\) with forward slashes (/). This is not only for the libraries you have created, but also for their subfolders. There are also other configuration file paths you need to update. The ones I found were %AppDataPath%, %RootFolderPath% and %MetadataPath%. If not all your media has been transferred to the new server, do not leave emby running on the new server for too long as it will detect that some media files are not there and update the database accordingly. Haven't really tested this, so can't really confirm how true this is, but coming back to the server after leaving it on for a night, I found all the entries with the broken image posters gone. The MediaItems table stores all the information about the media, but the watch data is store in the UserDatas table. They share a column called "UserDataKeyId" which uniquely identifies each MediaItem to User pair. To check if your database is properly configured, look up a show you know you've watched in MediaItems then check if the UserDatas table reflects this as played. For example to get the UserDataKeyId: SELECT UserDataKeyId FROM MediaItems WHERE path like "%video_name.mp4%"; Then to check UserDatas: SELECT played FROM UserDatas WHERE UserDataKeyId=the_id_you_found_previously; This command will return 1 for a show you've seen, and 0 for a show you haven't seen. You can also get a list of all shows that library.db thinks you've seen with SELECT UserDataKeyId FROM UserDatas WHERE UserId=some_id; Check the LocalUsersV2 table in users.db for the UserId. Finally, I also had the nfo files saved with the media. This is an option you can enable in the server settings. Got a strong feeling that things would have been much more difficult without that. Hope this helps someone. Edited December 25, 2022 by LEGEND96 1 1 Link to comment Share on other sites More sharing options...
ulrick65 20 Posted December 29, 2022 Share Posted December 29, 2022 Updating to a new file server, paths are changing. This makes the 3rd time for me in as many years...painful process. I thought perhaps this topic here would be an easy answer, but doesn't sound like it. I think I will just recreate all 10 libraries and let it go. Even that is not easy (hand typing in all the selections. Been discussing for a few years now about adding this capability in... @Luke has there been any movement on that at all to look forward to? Understand it is probably low priority compared to other things that a lot of users benefit from...so just curious here if anything is happening on it. Thanks. Link to comment Share on other sites More sharing options...
Luke 36881 Posted December 30, 2022 Share Posted December 30, 2022 17 hours ago, ulrick65 said: Updating to a new file server, paths are changing. This makes the 3rd time for me in as many years...painful process. I thought perhaps this topic here would be an easy answer, but doesn't sound like it. I think I will just recreate all 10 libraries and let it go. Even that is not easy (hand typing in all the selections. Been discussing for a few years now about adding this capability in... @Luke has there been any movement on that at all to look forward to? Understand it is probably low priority compared to other things that a lot of users benefit from...so just curious here if anything is happening on it. Thanks. Hi, no movement yet but it's still on our radar. Thanks. 1 Link to comment Share on other sites More sharing options...
LEGEND96 2 Posted January 21, 2023 Share Posted January 21, 2023 I've confirmed that the issue raised by andrewds is present. Turning on the debug logs I found the following line when running a library scan. Version: 4.7.11.0 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 5.15.0-58-generic (buildd@lcy02-amd64-033) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #64~20.04. Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 4 Data path: /config Application path: /system System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/run/s6/services/emby-server/E:\Shows\Anime'. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1.Init() at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.DirectoryInfo.EnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path, Boolean clearCache) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.LocalMetadata.Images.LocalImageProvider.GetFiles(String[] paths, Boolean throwOnException, IDirectoryService directoryService) Source: System.Private.CoreLib TargetSite: IntPtr CreateDirectoryHandle(System.String, Boolean) Particularly, the line "System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/run/s6/services/emby-server/E:\Shows\Anime'." I've searched the DB files and couldn't find anything that still has the old path. Perhaps someone on the team could point out the config file that the software pulls information from for that path? Link to comment Share on other sites More sharing options...
LEGEND96 2 Posted January 21, 2023 Share Posted January 21, 2023 2 hours ago, LEGEND96 said: I've confirmed that the issue raised by andrewds is present. Turning on the debug logs I found the following line when running a library scan. Version: 4.7.11.0 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 5.15.0-58-generic (buildd@lcy02-amd64-033) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #64~20.04. Framework: .NET 6.0.8 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 4 Data path: /config Application path: /system System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/run/s6/services/emby-server/E:\Shows\Anime'. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1.Init() at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.DirectoryInfo.EnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path, Boolean clearCache) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.LocalMetadata.Images.LocalImageProvider.GetFiles(String[] paths, Boolean throwOnException, IDirectoryService directoryService) Source: System.Private.CoreLib TargetSite: IntPtr CreateDirectoryHandle(System.String, Boolean) Particularly, the line "System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/run/s6/services/emby-server/E:\Shows\Anime'." I've searched the DB files and couldn't find anything that still has the old path. Perhaps someone on the team could point out the config file that the software pulls information from for that path? Sorry nevermind, found it in the library.db. Doesn't solve the issue though. Emby still rescans and redownloads all the metadata even if I migrated the metadata folder. Maybe the team could share a little on how the library scan works? Link to comment Share on other sites More sharing options...
Luke 36881 Posted January 21, 2023 Share Posted January 21, 2023 It will rescan when you move a library but it's something we plan to improve on in future updates. Thanks. Link to comment Share on other sites More sharing options...
Ceten 27 Posted March 8, 2023 Share Posted March 8, 2023 On 10/7/2022 at 9:05 PM, Luke said: Maybe it's possible that some have gotten through this without a rescan but other than that I can't think of any. But I understand that until we offer it users are still going to try and find a way to accomplish it, and there's nothing wrong with that. On 1/21/2023 at 7:56 PM, Luke said: It will rescan when you move a library but it's something we plan to improve on in future updates. Thanks. I've just read through this topic and it seems a rescan is always going to take place whether you change the paths manually or not so if I understand it correctly there's no advantage in doing this over just changing the library path in the UI as the rescan will ignore the manual changes? If you store the metadata (as nfo) and images in the media folders Emby should use that instead of searching for new metadata and images using the providers? And playstate is linked to the TheTVDB.com Series ID/ IMDB ID/... so that should persist as well? I'll be moving all my series to a new volume on my NAS shortly so I'm looking for the best way with as little downtime as possible but most importantly preserving which episodes have been watched. Link to comment Share on other sites More sharing options...
andrewds 87 Posted March 8, 2023 Share Posted March 8, 2023 There's no benefit. I hand edited the db and didn't gain anything. I did not store images or metadata externally and all was reset. However play states were preserved. Link to comment Share on other sites More sharing options...
80srule 22 Posted March 28, 2023 Share Posted March 28, 2023 On 1/14/2021 at 6:59 PM, stavol23 said: Hi, Need help with same topic, i just need to change the library path of my media from "/mnt/gdrive" to "/mnt/unionfs". The contents of my media are both present in both directories just want to change the path in emby server. I tried doing the steps listed above with no success. Thanks. was able to figure it out, i needed to edit options.xml on library. Thanks. Where do you find this xml? Link to comment Share on other sites More sharing options...
80srule 22 Posted April 22, 2023 Share Posted April 22, 2023 On 10/4/2019 at 2:21 PM, dannymichel said: Lets say you want to move everything from /mnt/mergerfs/tv to /mnt/mergerfs/media/tv cd /var/lib/emby-server/data sqlite3 library.db UPDATE MediaItems SET Path= replace(Path, '/mnt/mergerfs', '/mnt/mergerfs/media') where Path like '%/mnt/mergerfs%'; UPDATE MediaStreams2 SET Path= replace(Path, '/mnt/mergerfs', '/mnt/mergerfs/media') where Path like '%/mnt/mergerfs%'; UPDATE TypedBaseItems SET Path= replace(Path, '/mnt/mergerfs', '/mnt/mergerfs/media') where Path like '%/mnt/mergerfs%'; .save library.db; .exit simple as that What do you use to do this? and what is the file your opening? I tried this in the command line and I get no such file as MediaItems Link to comment Share on other sites More sharing options...
DaveM77 0 Posted December 13, 2023 Share Posted December 13, 2023 (edited) On 06/10/2022 at 20:27, andrewds said: Hello: Today I've confirmed that the steps in this document work for a storage migration, tested on Windows. 1. Shut down Emby Server 2. Navigate to %AppData%\Emby-Server\programdata\root\ and create a backup copy of the default folder (call it defaultbak) 3. Manually update the library folder paths for each library in %AppData%\Emby-Server\programdata\root\default\<LIBRARY>\options.xml (PathInfos key) <snipped -the rest is still above> For anyone who stumbles across it wondering if it still works - I followed this today for doing the same (I had to update a path for a NAS as the share name changed) and it worked great. Edited December 13, 2023 by DaveM77 clarity Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now