2024-08-04, 12:37 PM
(This post was last modified: 2024-08-04, 12:55 PM by raulo1985. Edited 5 times in total.)
(2024-07-21, 05:25 PM)TheDreadPirate Wrote: The problem is that the Jellyfin server generates a unique ID. When you reinstall from scratch it generates another unique ID and the clients don't like that. You should be backing up /var/lib/jellyfin and /etc/jellyfin and restoring those directories and resetting the file permissions. This will preserve the unique ID.
(2024-07-28, 12:36 AM)TheDreadPirate Wrote: Here is what I did to backup and restore my Jellyfin completely.
Code:mkdir -p /path/to/backup/drive/jellyfin
cd /path/to/backup/drive/jellyfin
mkdir jellyfinEtc jellyfinVar jellyfinCache
sudo rsync -a -p --progress /etc/jellyfin jellyfinEtc/
sudo rsync -a -p --progress /var/lib/jellyfin jellyfinVar/
sudo rsync -a -p --progress /var/cache/jellyfin jellyfinCache/
NOT putting a slash at the end of the SOURCE path is important. Without the slash rsync will pull the entire directory, including hidden files and folders. If you put a /* at the end of the source path it would not grab hidden folders and files.
To simulate a fresh OS install
Code:sudo apt purge jellyfin*
To reinstall
Code:curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
To restore
Code:sudo systemctl stop jellyfin
cd /etc
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinEtc/jellyfin .
cd /var/lib
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinVar/jellyfin .
cd /var/cache
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinCache/jellyfin .
sudo chown -R jellyfin /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin
sudo systemctl start jellyfin
None of my clients had to re-login.
Hi. As mentioned in my previous post, I did the exact same things as you did, but at least with JMP and WebOS app (not touched, same settings and everything. Only the server was reinstalled from scratch) when I restored /etc/jellyfin and /var/lib/jellyfin the clients take me to the server page that’s shown when you first start it after a full reinstall. And you can get to the point where you create the admin account, but you can’t get past that because it shows an error message when you try. And obviously is not necessary to do so either, as users including admin were indeed restored.
If I’m on that page and go backwards, then I get to the screen with the correct users, and can log in after entering the corresponding password. But no auto log in. On the other hand, with the iOS official app it does auto log in, as if nothing had changed on the server side (which is what I want to accomplish with all the clients. Or at least with JMP and WebOS app, because those are the ones my relatives use on a daily basis).
The only thing I did differently than you is that I didn’t backup and restore the cache directory. Is it important for this purpose? I wouldn’t have thought that backing up and restoring that directory was important (in my mind, cache almost always can be deleted without issues). The other part of the process was done like you did (backing up and restoring the etc and var directories and setting up the permissions), but the behavior by doing so, in my case is, at best, getting to the log in page.
So far everything I’ve done gets me to the log in page, or sometimes it gets stuck (loading sign that lasts forever). Not even a full backup of etc and var JF directories manages to accomplish auto log in.
Do you have any ideas / suggestions? It appears that at least the server is being recognized: when you start from scratch without backing anything up, all the clients show you the available servers at the pointed IP address, now at least they recognize it’s the same server and shows you the existing users for logging in. So I believe the ID is preserved, and also the log in credentials (if I select a user and enter the password, it does log in). But somehow, even though with a full backup I thought the clients should see the new server as if it was the same as the last one (not even noticing it’s a new one), they still don’t auto log in (with JMP and WebOS. With iOS app, no issues, and I don’t have other devices to test with other clients).
Unless it has something to do with the cache directory (not backed up), I’m running out of ideas. I really don’t know why they don’t auto log in after a full etc and var JF directories restore (specially now, knowing that you took the same steps than I did and none of your clients asked you to manually log in after a fresh server install). If also restoring the cache directory doesn’t do the trick, then I officially don’t have a clue and don’t even know how to find out.
So any suggestion would be appreciated. Having to remote desktop and also phone my relatives to guide them for them to log in again with their clients is a lot more complex than what it should be (guiding my dad by phone to log in again with his LG Smart TV is painfully complicated. And the same goes to my mother with her Windows 10 notebook with JMP. Tech is really not their thing), so being free from those steps would be really nice for my setup and use case (and also would allow me to reinstall the server from scratch whenever I want, without my relatives having to do anything or even noticing that the server was reinstalled). It should be possible (in fact it is, as it worked for you), but clearly I’m missing something. If it’s not the cache directory, any idea of what I could try next?