Thefrank / jellyfin-server-freebsd

jellyfin-server component for freebsd
185 stars 16 forks source link

Config lost after migrating to new version #49

Open septarchy opened 1 year ago

septarchy commented 1 year ago

Hello TheFrank,

Thanks for your support everytime and taking the time to update jellyfin for the community. I installed the latest version via your github, but now all data from my previous installation is gone?

Can you tell me where the configs are saved?

I already tried installing the older jellyfinserver version, but that didn't help.

Thefrank commented 1 year ago

The default location has not changed in some time. What version did you have installed and what version did you upgrade to?

Danacus commented 1 year ago

From what I can tell, data was previously stored in /var/db/jellyfinserver, but when installing jellyfin from https://www.freshports.org/multimedia/jellyfin/, the data is stored in /var/db/jellyfin.

Danacus commented 1 year ago

I had to take the following actions to migrate to 10.8.10:

Remove old jellyfinserver package:

pkg remove jellyfinserver

Install new jellyfin package:

pkg install jellyfin

Copy files:

cp -r /var/db/jellyfinserver/. /var/db/jellyfin cp -r /var/cache/jellyfinserver/. /var/cache/jellyfin

Change ownership:

chown -R jellyfin /var/db/jellyfin chown -R jellyfin /var/cache/jellyfin

Then enable and start the jellyfin service.

Thefrank commented 1 year ago

@Danacus good catch! The change in the port name would change where it stores the data. @septarchy see if that fixes it

septarchy commented 1 year ago

Ah thanks that might explain it. I restored the snapshot i took before upgrading, so I reverted back to my old situation. Thanks for figuring it out though.

Thefrank commented 1 year ago

@septarchy you can also use sysrc to override where jellyfin stores its data

Thefrank commented 1 year ago

added details from https://github.com/Thefrank/jellyfin-server-freebsd/issues/49#issuecomment-1540190015 and some information on using sysrc to the troubleshooting section.

Danacus commented 1 year ago

Perhaps one more suggestion. In the troubleshooting section, you say that "very old" versions store data in a different place. However, the installation instructions still explain how to install this "very old" version, which was actually still the latest version just a few weeks ago.

Maybe it would make sense to change these instructions to install the official port instead, otherwise people may still install the "very old" version. And maybe also mention that the package name, as well as the data and cache locations changed somewhere in those instructions, or on the releases page.

Thefrank commented 1 year ago

Good points all around! I updated the TrueNAS doc to fix up some inconsistency.

I also take pull requests if you have time to contribute to clarifying these guides

badrpc commented 1 year ago

Renaming jellyfinserver directories to jellyfin after switching a package from this repository (I think it was 10.8.8) to the one from pkg.freebsd.org was not enough for me. I still saw references to jellyfinserver in logs. I suspect some absolute paths may somehow end up in the database. I would only recommend changing jellyfin_data_dir and jellyfin_cache_dir and not renaming.

Thefrank commented 1 year ago

I am going to reopen this for 1) visibility and 2) it seems to be an on going issue

septarchy commented 1 year ago

I tried the steps again. It seems to be working except, i can't see any thumbnail or movie now? Prob. permission problem?

https://i.imgur.com/TuXfUnd.png

RobTheGob commented 1 year ago

I had the same issue with blurred thumbnails - I had to manually change two paths in General settings:

Server->General->Paths:

Cache path: from /var/cache/jellyfinserver to /var/cache/jellyfin Metadata path: from /var/db/jellyfinserver/metadata to /var/db/jellyfin/metadata

I also noticed that there are old references to /var/db/jellyfinserver/... in the Metadata section, but they don't appear to affect things for me. I can't edit the path there - the only way I found to reset the path was to remove Library and re-create it.

For the time being - I've left the Metadata references to jellyfinserver and renamed the /var/db/jellyfinserver and /var/cache/jellyfinserver directories to make them inaccessible.

h0m35t4r commented 7 months ago

Just incase anyone is still wondering how to fix the references to the old path in the log files.

I found references to jellyfinserver in the TypedBaseItems table under the fields with type MediaBrowser.Controller.Entities.CollectionFolder

I am no longer getting these references and also the shared network folder path now populates within the user interface. Hope this helps someone

https://github.com/jellyfin/jellyfin/issues/7576#issuecomment-1094171148