• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Moving Server To New System With Different Username

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    Moving Server To New System With Different Username

    pavichokche
    Offline

    Junior Member

    Posts: 36
    Threads: 5
    Joined: 2023 Sep
    Reputation: 0
    #1
    2024-11-26, 03:23 PM
    My server is running on Windows 11 and I'm migrating to Windows Server 2025. The issue I'm running into mainly is that the USERNAME for the user on the new system is different than the old one, and that's where my jellyfin configs and library are (%localappdata%\jellyfin\).

    I tried to edit a couple of the files I could find references to the user name in and replace it with the new user name. That MOSTLY got things to work. The server started up, I could log in with my user and I could play back a show.

    Before running the server installer on the new system, I also pasted in the Program Files\Jellyfin\Server directory, but I didn't edit anything in it.

    However I started noticing a few strange things - the TV Shows library had every show marked as watched BUT inside the seasons/episodes had the correct status. Also, while I was able to play back existing episodes, the server was somehow not able to correctly access the directory where the shows are stored (all directories are identical on the new OS).
    Then I checked the logs and once again there were still somehow references to the old username and that's where I set this aside and fired the old system back up.

    Any ideas on how I can thoroughly replace references to the old username directory from all relevant files in order to do this migration? Is there something else I could be missing?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-11-26, 03:27 PM
    Are you talking about the Windows user name changing? If so, I don't see why you'd need to change anything IN jellyfin other than, maybe, file ownership.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    pavichokche
    Offline

    Junior Member

    Posts: 36
    Threads: 5
    Joined: 2023 Sep
    Reputation: 0
    #3
    2024-11-26, 03:33 PM (This post was last modified: 2024-11-26, 03:37 PM by pavichokche. Edited 1 time in total.)
    Here are some of the bits from the log file which reference the old user directory still:

    [2024-11-26 00:45:36.222 -05:00] [ERR] [3] MediaBrowser.Controller.Entities.BaseItem: Error refreshing owned items for "C:\Users\old_username\AppData\Local\Jellyfin\root\default\Kids"
    System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\old_username \AppData\Local\Jellyfin\root\default\Kids'.

    ^ this one I got for each library and the collections library

    [2024-11-26 00:26:30.832 -05:00] [INF] [14] Emby.Server.Implementations.ScheduledTasks.Tasks.CleanupCollectionAndPlaylistPathsTask: Item in "Christmas Movies" cannot be found at "C:\Users\ old_username \AppData\Local\Jellyfin\data\collections\The Santa Clause Collection [boxset]"

    ^ this one I got for each collection that I made myself

    And that's about it...there were errors struggling to find the profile pictures for each user but I think the server sorted itself out because I saw them reappear later (at startup all the main directories are pointing to the correct place with the new windows username).



    (2024-11-26, 03:27 PM)TheDreadPirate Wrote: Are you talking about the Windows user name changing?  If so, I don't see why you'd need to change anything IN jellyfin other than, maybe, file ownership.

    Yes, the windows user name on the new system is different. There are a number of config files which point to locations in %localappdata (which as we know contains the user name). 
    Editing those couple of files remedied most of the issues, but a few still persist, as seen in the log exerpts I shared above.

    %localappdata%\jellyfin\config\config.xml:
    <CachePath>C:\Users\new_username\AppData\Local\Jellyfin\cache</CachePath>
    <MetadataPath>C:\Users\new_username\AppData\Local\Jellyfin\metadata</MetadataPath>
    pavichokche
    Offline

    Junior Member

    Posts: 36
    Threads: 5
    Joined: 2023 Sep
    Reputation: 0
    #4
    2024-11-26, 03:42 PM
    In case it wasn't clear - I copied over my entire jellyfin data directory and program files server directory in order to "transfer" the server settings with no loss of metadata and user data.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2024-11-26, 04:23 PM
    Ah. Ok. I had assumed that all your data was in C:\ProgramData\Jellyfin, which wouldn't require this.

    You will have to open jellyfin.db and library.db and find all instances of the old username and replace it. When I migrated from a direct Linux install to a Docker install, this is one of the steps I had to take.

    DB4S is the app I used to open and modify the DB files.

    https://sqlitebrowser.org/
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    pavichokche
    Offline

    Junior Member

    Posts: 36
    Threads: 5
    Joined: 2023 Sep
    Reputation: 0
    #6
    2024-11-26, 04:28 PM (This post was last modified: 2024-11-26, 04:50 PM by pavichokche. Edited 2 times in total.)
    (2024-11-26, 04:23 PM)TheDreadPirate Wrote: Ah.  Ok.  I had assumed that all your data was in C:\ProgramData\Jellyfin, which wouldn't require this.

    You will have to open jellyfin.db and library.db and find all instances of the old username and replace it.  When I migrated from a direct Linux install to a Docker install, this is one of the steps I had to take.

    DB4S is the app I used to open and modify the DB files.

    https://sqlitebrowser.org/

    Amazing! Thank you so much!

    I just had another thought which is so crazy it might just work - what if I just created a directory in C:\users\ ?
    I could create \old_username\appdata\local\ and copy over the jellyfin folder there and keep all configs as they are...I could also create that directory but only put a symbolic link in it, pointing to the true %localappdata%\jellyfin where I'll move the server to. This way no matter what is sought after - old_username or new_username it would find the directory. Crazy, I know Grinning-face


    By the way, why are some Windows servers storing their data in programdata and some in %localappdata%? When I first installed jellyfin (version 1.8 something) I think it set me up in programdata, but one of the updates that came soon after seemingly moved everything over to %localappdata%. I remember the day, it seemed like my server was broken and I figured out from the logs that it had started looking for configs in %localappdata%, so moving things there fixed things. But yeah...what's up with that?
    wenzelja
    Offline

    Member

    Posts: 70
    Threads: 11
    Joined: 2024 Nov
    Reputation: 1
    Country:United States
    #7
    2024-11-26, 04:47 PM
    (2024-11-26, 04:28 PM)pavichokche Wrote:
    (2024-11-26, 04:23 PM)TheDreadPirate Wrote: Ah.  Ok.  I had assumed that all your data was in C:\ProgramData\Jellyfin, which wouldn't require this.

    You will have to open jellyfin.db and library.db and find all instances of the old username and replace it.  When I migrated from a direct Linux install to a Docker install, this is one of the steps I had to take.

    DB4S is the app I used to open and modify the DB files.

    https://sqlitebrowser.org/

    Amazing! Thank you so much!

    I just had another thought which is so crazy it might just work - what if I just created a directory in C:\users\ ?
    I could create \old_username\appdata\local\ and copy over the jellyfin folder there and keep all configs as they are...

    That might be the cleanest way to do it; create user [old username] in your new Windows Server, copy your jellyfin files/folders from old computer into new computer under C:\users\[old username].
    paulc
    Offline

    Member

    Posts: 83
    Threads: 7
    Joined: 2023 Jun
    Reputation: 5
    Country:United States
    #8
    2024-11-26, 05:16 PM
    (2024-11-26, 04:28 PM)pavichokche Wrote: Amazing! Thank you so much!

    I just had another thought which is so crazy it might just work - what if I just created a directory in C:\users\ ?
    I could create \old_username\appdata\local\ and copy over the jellyfin folder there and keep all configs as they are...I could also create that directory but only put a symbolic link in it, pointing to the true %localappdata%\jellyfin where I'll move the server to. This way no matter what is sought after - old_username or new_username it would find the directory. Crazy, I know Grinning-face

    I'd go with a directory junction to default location for a quick fix but edit the database to make change perm for future. Who knows what will change in the future.
    mklink /j MyFolder ACTUALLOCATION

    MYFOLDER = old username location

    mklink | Microsoft Learn
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2024-11-26, 05:20 PM (This post was last modified: 2024-11-26, 05:21 PM by TheDreadPirate. Edited 1 time in total.)
    If the server starts with admin permissions, Jellyfin will write to ProgramData. Otherwise Jellyfin data gets written to the user's local appdata. I've seen some users experience the issue you described of it changing directories after the fact. But I don't have enough info to base a hypothesis on besides "just Windows things".

    Your idea for not having to modify data should work, though.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    pavichokche
    Offline

    Junior Member

    Posts: 36
    Threads: 5
    Joined: 2023 Sep
    Reputation: 0
    #10
    2024-11-26, 05:27 PM (This post was last modified: 2024-11-26, 05:29 PM by pavichokche.)
    (2024-11-26, 05:16 PM)paulc Wrote: I'd go with a directory junction to default location for a quick fix but edit the database to make change perm for future. Who knows what will change in the future.
    mklink /j MyFolder ACTUALLOCATION

    If I'm creating a junction to the user directory which the files are expecting (old_username %localappdata%), then what edits do I make to the database?

    (2024-11-26, 05:20 PM)TheDreadPirate Wrote: If the server starts with admin permissions, Jellyfin will write to ProgramData.  Otherwise Jellyfin data gets written to the user's local appdata.  I've seen some users experience the issue you described of it changing directories after the fact.  But I don't have enough info to base a hypothesis on besides "just Windows things".

    Your idea for not having to modify data should work, though.

    I see, thank you for explaining. This must be what happened  - perhaps I installed Jellyfin as administrator but later ran the update(s) not as administrator and it carried on that way. Strange, though, I thought all of these application installers require administrator rights to run in the first place.
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode