Moving libraries to a different disk - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions) +--- Thread: Moving libraries to a different disk (/t-moving-libraries-to-a-different-disk) Pages:
1
2
|
Moving libraries to a different disk - jellyfin - 2024-11-22 I started my Jellyfin experience on an external Samsung T7 Touch SSD at my Mac Mini. After about 80 DVDs added to the libraries, I noticed that the disk is already nearly full and I am only about at half of my DVDs. So I copied all libraries to a bigger disk. And then ... I noticed that there is no option to set new locations in Jellyfin... This surprised me, as I thought this to be something that nearly every users will need to do at some point. As my disks are named for their type, the libraries are currently below /Volumes/T7_Touch1TB/{MOVIES,SERIES,...} They should go to /Volumes/CRUCIAL/MEDIA/{MOVIES,SERIES,...} I searched the Internet, but only found very crude manual steps for this and an old Python script for Docker and Windows. I then found this: https://github.com/jellyfin/jellyfin/issues/9922 And the last comment was, that this was "completed" in September 2023, which gave new hope - but I cannot find nothing about this and cannot even find this request in the list of feature requests. Can anybody give me a hint wether this is possible and even somehow implemented in Jellyfin? I mean, it seems to be a very common requirement to move your libraries 😅🤗 Many thanks for any hint! RE: Moving libraries to a different disk - TheDreadPirate - 2024-11-22 You can't "move" libraries, but you can add a new folder to the existing library. Open the library settings and click the "+" at the top to add your new folder. Then the "-" next to the old folder to remove it. RE: Moving libraries to a different disk - jellyfin - 2024-11-23 (2024-11-22, 11:15 PM)TheDreadPirate Wrote: You can't "move" libraries, but you can add a new folder to the existing library. Open the library settings and click the "+" at the top to add your new folder. Then the "-" next to the old folder to remove it. That allows me to add the copy of a library folder and remove the old one WITHOUT loosing all my metadata?!? It does not sound like it will do this - more like just adding a new and empty folder in which I could then add new movies. That was not the goal, I want to use a different disk - with all my content and without any other changes (or losses) to Jellyfin! Like with any other App ... most just say something like "cannot find folder xyz, please provide the right location" and them you can select the disk and folder where is stuff can be found. RE: Moving libraries to a different disk - TheDreadPirate - 2024-11-23 In my experience, Jellyfin preserves metadata and watch status when I've had to move files around. In Jellyfin add your new folder to the library BEFORE you move your data. Once you've added the new folder you will STOP jellyfin completely. While Jellyfin is stopped you will move your files to the new folder. Before proceeding, you should backup your Jellyfin data directory so that you can restore if something goes wrong. You never know. Once the files transfer is complete you can then start Jellyfin. Scan your library and it should just remap all your existing metadata and watch status to the relocated folders. Once you've verified that you can remove the old folder from the library settings. RE: Moving libraries to a different disk - jellyfin - 2024-11-23 (2024-11-23, 12:53 AM)TheDreadPirate Wrote: In my experience, Jellyfin preserves metadata and watch status when I've had to move files around. Many thanks for this hint! Sadly, it did not work out - see the next post with all details. # Jellyfin: Moving Libraries on macOS I show what I did and how and then the result of this. ## Preparations tja@mini:~/Library/Application Support$ du -hs jellyfin/* 1.1G jellyfin/cache 28K jellyfin/config 24M jellyfin/data 924K jellyfin/log 201M jellyfin/metadata 16K jellyfin/plugins 44K jellyfin/root I first stopped Jellyfin, then I created a backup of the above data: tja@mini:~/Library/Application Support$ tar cf ~/Library_Application_Support_jellyfin.tar ./jellyfin tja@mini:~$ ls -h Library_Application_Support_jellyfin.tar -rw-r--r-- 1 tja staff 1.3G Nov 23 14:25 Library_Application_Support_jellyfin.tar I prepared new folder for the new Library locations: tja@miniVolumes/XTRMQ$ mkdir -p MEDIA/{MOVIES,SERIES,PRIVATE,INTERNET,INBOX} tja@miniVolumes/XTRMQ$ find MEDIA -ls 5322 0 drwxr-xr-x 7 tja staff 224 Nov 23 14:27 MEDIA 5324 0 drwxr-xr-x 2 tja staff 64 Nov 23 14:27 MEDIA/SERIES 5327 0 drwxr-xr-x 2 tja staff 64 Nov 23 14:27 MEDIA/INBOX 5326 0 drwxr-xr-x 2 tja staff 64 Nov 23 14:27 MEDIA/INTERNET 5325 0 drwxr-xr-x 2 tja staff 64 Nov 23 14:27 MEDIA/PRIVATE 5323 0 drwxr-xr-x 2 tja staff 64 Nov 23 14:27 MEDIA/MOVIES After that, I started Jellyfin again and added those empty locations as new Libraries to Jellyfin: Jellyfin webpage, Dashboard, Libraries, Libraries, Add Media Library I added the new folders and only enabled “Save artwork into media folders” and the 3 Trickplay options for all of them. For some unknown reason, the Library names all appeared with an appended “2”: MOVIES2 I also face the first problem here: You cannot see which type a Library is, when it is shown as “Other”. I tried “Mixed Films and Programmes” and that was the wrong guess. I needed to use “Home Videos and Photos” for this Library instead. ## Moving content I then shutdown Jellyfin again, made new backup of the Jellyfin configuration, just to be sure: tja@mini:~/Library/Application Support$ tar cf ~/Library_Application_Support_jellyfin_2.tar ./jellyfin And then I moved my content: I made sure that the OLD folders did exist, but were empty and that the NEW folders contained the content instead. ## Restarting Jellyfin Then I started Jellyfin again, opened it’s webpage, entered the Dashboard and issued “Scan All Libraries” ... which did not do nothing at first, at least not visible. But with a later try, the progress bar appeared. After that I checked my new MOVIES2 Library - and found all of my metadata deleted! All movies have wrong names, changed or wrong images, other have no linking to a movie database anymore or point to an chinese version of the movie (one of the Star Wars movies) It’s like I started new! Horrible. To make this short: Jellyfin is the worst software I EVER encountered! It makes any migration nearly impossible, which is unheard of. I still think about trying those sqlite commands or if I just should open the old and new Libraries in 2 browser windows and redo everthing I did before, identifying and renaming stuff. RE: Moving libraries to a different disk - jellyfin - 2024-11-23 I tried to modify the SQlite database like this: tja@mini:~/Library/Application Support/jellyfin/data$ sqlite3 library.db SQLite version 3.47.0 2024-10-21 16:30:22 Enter ".help" for usage hints. sqlite> .output library.sql sqlite> .dump sqlite> .exit tja@mini:~/Library/Application Support/jellyfin/data$ sed 's@/T7_Touch1TB/MOVIES@/XTRMQ/MEDIA/MOVIES@g;s@/T7_Touch1TB/SERIES@/XTRMQ/MEDIA/SERIES@g;s@/T7_Touch1TB/INTERNET@/XTRMQ/MEDIA/INTERNET@g;s@/T7_Touch1TB/PRIVATE@/XTRMQ/MEDIA/PRIVATE@g' library.sql > library.new tja@mini:~/Library/Application Support/jellyfin/data$ sqlite3 library2.db SQLite version 3.47.0 2024-10-21 16:30:22 Enter ".help" for usage hints. sqlite> .read ./library.new sqlite> .exit tja@mini:~/Library/Application Support/jellyfin/data$ mv library2.db library.db tja@mini:~/Library/Application Support/jellyfin/data$ rm library.sql library.new Then I started Jellyfin again and scanned all media libraries. Result: All content gone from Jellyfin, totally. If I want to continue, I need to seek out the docs I found before and also check the old Python script, even as this was for Windows and Docker. As I said: Horrible! RE: Moving libraries to a different disk - jellyfin - 2024-11-23 I tried some other tricks, including modifying the jellyfin.db database files, but to no avail. Migration is not possible. Not in any acceptable way. RE: Moving libraries to a different disk - jellyfin - 2024-11-23 I repeated the same with all 4 Sqlite databases I saw, there can be 2 more: Code: tja@mini:~$ cat ./jelly.sh That did not help either. The Libraries still point to the old location in the Dashboard and that cannot be changed in the Sqlite databases, it seems. RE: Moving libraries to a different disk - jellyfin - 2024-11-23 I think, I found a way for a clean migration! Going to post later in the other forum category, other checking and providing a script for it! Thanks again @TheDreadPirate ! RE: Moving libraries to a different disk - jellyfin - 2024-11-23 That was too early :-D While I found a way to change all pathes, I now have double as many movies - all movies show up 2 times, but both versions with the same metadata and the same location. I am short of giving up. |