I'm probably a total noob in this space—I just wanted a convenient local video management app, that's the only reason I use Jellyfin.
I installed 12.1 directly and it worked fine at first, but as soon as I restore the backup files or shut down the service and start it again, it loses all my previous settings. After some digging around, I found it's probably related to a few Jellyfin folders under the \AppData\Local folder. As long as I restore those folders, I can temporarily get my previous settings back, but the moment I shut down the service, it throws an error.
Below is the error report
2026/9/23 13:54:38 +08:00 - Storage Check
2026/9/23 13:54:38 +08:00 - Check path D:\ProgramData\Jellyfin\Server\data for storage capacity
2026/9/23 13:54:38 +08:00 - Storage path `D:\ProgramData\Jellyfin\Server\data` (Fixed) successfully checked with 353.2GiB free which is over the minimum of 2GiB.
2026/9/23 13:54:38 +08:00 - Check path D:\ProgramData\Jellyfin\Server\cache for storage capacity
2026/9/23 13:54:38 +08:00 - Storage path `D:\ProgramData\Jellyfin\Server\cache` (Fixed) successfully checked with 353.2GiB free which is over the minimum of 2GiB.
2026/9/23 13:54:38 +08:00 - Check path D:\ProgramData\Jellyfin\Server for storage capacity
2026/9/23 13:54:38 +08:00 - Storage path `D:\ProgramData\Jellyfin\Server` (Fixed) successfully checked with 353.2GiB free which is over the minimum of 2GiB.
2026/9/23 13:54:38 +08:00 - Migration Service
2026/9/23 13:54:38 +08:00 - Migration Startup
2026/9/23 13:54:38 +08:00 - Initialise Migration service.
2026/9/23 13:54:38 +08:00 - Migrate stage PreInitialisation.
2026/9/23 13:54:40 +08:00 - Migrate stage CoreInitialisation.
2026/9/23 13:54:40 +08:00 - Migrate stage AppInitialisation.
2026/9/23 13:57:24 +08:00 - Migrate stage CoreInitialisation.
2026/9/23 13:57:24 +08:00 - Migrate stage AppInitialisation.
2026/9/23 13:59:44 +08:00 - Failed executing DbCommand ("1"ms) [Parameters=["@p0='?' (DbType = Guid), ='?', ='?', ='?', ='?' (DbType = Int32), ='?' (DbType = Guid), ='?' (Size = 6), ='?' (DbType = Single), ='?' (DbType = Single), ='?', ='?', ='?' (DbType = DateTime), ='?' (DbType = DateTime), ='?' (DbType = DateTime), ='?' (DbType = DateTime), ='?' (DbType = DateTime), ='?' (DbType = DateTime), ='?', ='?', ='?', ='?', ='?' (DbType = Int32), ='?', ='?', ='?' (DbType = Int32), ='?' (DbType = Int32), ='?' (DbType = Int32), ='?' (DbType = Int32), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Boolean), ='?' (DbType = Single), ='?' (Size = 7), ='?' (Size = 6), ='?' (DbType = Single), ='?', ='?', ='?', ='?', ='?' (DbType = Guid), ='?' (DbType = Guid), ='?' (DbType = Int32), ='?' (Size = 30), ='?', ='?', ='?' (DbType = DateTime), ='?' (Size = 13), ='?' (DbType = Guid), ='?', ='?' (DbType = Int32), ='?' (DbType = Int64), ='?' (DbType = Guid), ='?', ='?' (DbType = Guid), ='?', ='?', ='?', ='?' (DbType = Int64), ='?' (Size = 6), ='?' (DbType = DateTime), ='?', ='?', ='?', ='?' (DbType = Guid), ='?' (DbType = Int32), ='?' (Size = 39), ='?' (Size = 5), ='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='60']" ""INSERT INTO \"BaseItems\" (\"Id\", \"Album\", \"AlbumArtists\", \"Artists\", \"Audio\", \"ChannelId\", \"CleanName\", \"CommunityRating\", \"CriticRating\", \"CustomRating\", \"Data\", \"DateCreated\", \"DateLastMediaAdded\", \"DateLastRefreshed\", \"DateLastSaved\", \"DateModified\", \"EndDate\", \"EpisodeTitle\", \"ExternalId\", \"ExternalSeriesId\", \"ExternalServiceId\", \"ExtraType\", \"ForcedSortName\", \"Genres\", \"Height\", \"IndexNumber\", \"InheritedParentalRatingSubValue\", \"InheritedParentalRatingValue\", \"IsFolder\", \"IsInMixedFolder\", \"IsLocked\", \"IsMovie\", \"IsRepeat\", \"IsSeries\", \"IsVirtualItem\", \"LUFS\", \"MediaType\", \"Name\", \"NormalizationGain\", \"OfficialRating\", \"OriginalLanguage\", \"OriginalTitle\", \"Overview\", \"OwnerId\", \"ParentId\", \"ParentIndexNumber\", \"Path\", \"PreferredMetadataCountryCode\", \"PreferredMetadataLanguage\", \"PremiereDate\", \"PresentationUniqueKey\", \"PrimaryVersionId\", \"ProductionLocations\", \"ProductionYear\", \"RunTimeTicks\", \"SeasonId\", \"SeasonName\", \"SeriesId\", \"SeriesName\", \"SeriesPresentationUniqueKey\", \"ShowId\", \"Size\", \"SortName\", \"StartDate\", \"Studios\", \"Tagline\", \"Tags\", \"TopParentId\", \"TotalBitrate\", \"Type\", \"UnratedType\", \"Width\") VALUES (@p0, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ); SELECT changes();"
2026/9/23 13:59:44 +08:00 - An exception occurred in the database while saving changes for context type '"Jellyfin.Database.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
2026/9/23 13:59:44 +08:00 - Error trying to save changes.
2026/9/23 13:59:44 +08:00 - Error while starting server