Jump to content

Docker migration to Premier - Backup plugin not working.


Recommended Posts

markblomquist
Posted

Hello.  Longtime user of Emby Server free version, NEW to Premier.  I just moved to Premier to get the hardware transcoding and backup support using the Emby Backup and Restore Plugin (1.8.6).  Everything is great on the new setup and the hardware transcoding works wonderfully.  BUT, I cannot get the Backup and Restore plugin to work.  It fails every time I try it.  The relevant part of the Embyserver logfile is below.  The key error is [SQLitePCL.pretty.SQLiteException: Busy: database is locked]

I have done what I can to make sure the Emby Server isn't doing anything while I trigger the database backup.  I put it in maintenance mode and turned off realtime scanning on the media libraries. The target for the backup is set in the Plugin to "/backup", which is a persistent local folder on the Mint/Cinnamon host storage outside of the docker image to eliminate any file locking issues that might be caused by a NAS/CIFs target for backups.  The backup folder on the Mint/Cinnamon host gets populated with some basic folders but the backup never completes.

I have performed the Vacuum Database a number of times and that completes normally, so I don't think there is database corruption going on. 

DISCLAIMER : I am not a Linux expert and I only work in Docker to keep some network services running well in my SmartHome, so I could have done something stupid here.  In fact, this is my best guess as to what the problem is.  :) 

 

Hardware/Software specs.

- Embyserver Host : Mini-PC Intel N150 running the latest Mint/Cinnamon and Docker. Managed by a separate Portainer Business Edition node 2.33.5 LTS.

- Embyserver 4.10.1.0, single docker image dedicated on the Mini-PC.  

- Synology DS1821+ NAS running CIFS housing the Config data and Media libraries.  Latest/greatest updates.

- All Docker hosts and NAS are 1G ethernet connected.

YAML Config

Just in case this might have relevance, this is the YAML I am using.  This has been working fine for a long time.  The only modifications I made recently were to expose the N150 GPUs and add in the new folder on the local host to house the backups ( /home/admin01/DockerBackups/Embyserver2026).  I am running this image at elevated security to make sure the image wasn't getting hampered by no access to something.  The Mint/Cinnamon host has entries in the FSTAB to mount the NAS/CIFS shares at startup - that all works fine.

Version: "2.3"
services:
  emby:
    image: emby/embyserver
    container_name: embyserver2026

    # Enables DLNA and Wake-on-Lan by sharing the host network stack
    network_mode: host

    environment:
      - UID=0
      - GID=0
      - GIDLIST=992
   
    volumes:
      - /mnt/ConfigData/ConfigData:/config:rw
      - /mnt/KDrama:/mnt/share6:rw
      - /mnt/TV:/mnt/share5:rw
      - /mnt/Movie:/mnt/share4:rw
      - /mnt/Video:/mnt/share3:rw
      - /mnt/Photos:/mnt/share2:rw
      - /mnt/Music:/mnt/share1:rw
      - /home/admin01/DockerBackups/Embyserver2026:/backups:rw
    ports:
      - 8096:8096 # HTTP port
      - 8920:8920 # HTTPS port  
    devices:
      - /dev/dri:/dev/dri

    group_add:
      - "992"

    restart: on-failure

 

LOG FILE SECTION

2026-10-01 18:19:01.612 Info App: Begin BackupDatabase SqliteItemRepository
2026-10-01 18:19:01.613 Info SqliteItemRepository: Backing up to file /config/cache/temp/d92860243e534b08aa40a9bd5b64a01f/library.db
2026-10-01 18:19:01.628 Error TaskManager: Error
	*** Error Report ***
	Version: 4.10.1.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 7.0.0-34-generic (buildd@lcy02-amd64-117) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, GNU ld (GNU Binutils for Ubu
	OS/Process: x64/x64
	Framework: .NET 8.0.28
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /system
	SQLitePCL.pretty.SQLiteException: Busy: database is locked
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteException.CheckOk(Int32 rc)
	   at SQLitePCL.pretty.DatabaseBackupImpl.Step(Int32 nPages)
	   at SQLitePCL.pretty.DatabaseConnection.Backup(SQLiteDatabaseConnection This, String dbName, SQLiteDatabaseConnection destConn, String destDbName)
	   at SQLitePCL.pretty.DatabaseConnection.Backup(SQLiteDatabaseConnection This, SQLiteDatabaseConnection destConn)
	   at Emby.Sqlite.BaseSqliteRepository.BackupToFile(SQLiteDatabaseConnection sourceDb, String destinationFile, ILogger logger)
	   at Emby.Sqlite.BaseSqliteRepository.BackupToFile(String file)
	   at Emby.Sqlite.BaseSqliteRepository.BackupToDirectory(String directory)
	   at Emby.Server.Implementations.ApplicationHost.BackupDatabase(BaseSqliteRepository db, String destinationFolder)
	   at Emby.Server.Implementations.ApplicationHost.BackupDatabases(String destinationFolder)
	   at MBBackup.ServerEntryPoint.ExecuteBackupInternal(PluginConfiguration configuration, CancellationToken cancellationToken, IProgress`1 progress)
	   at MBBackup.ServerEntryPoint.ExecuteBackup(PluginConfiguration configuration, CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(Int32)
	
2026-10-01 18:19:01.628 Info TaskManager: Emby Server Backup Failed after 0 minute(s) and 0 seconds

 

This is a view of the folders created on the Mint/Cinnamon host just before the Backup Plugin fails.

image.png.5d7673a4eda3716c759714054dea2e40.png

Posted

Hi there, please attach the complete emby server log file. Thanks.

markblomquist
Posted

Here is my latest log file.

The Emby Server ConfigData folder, which includes the Library.db file located in /Embyserver/ConfigData/data, IS on a CIFS share on the NAS.  The Mint/Cinnamon host mounts the configdata and media folders using a User/Password that has full-control of the files on the NAS.  It seems that library.db file cannot be locked and something isn't working with the file-lock behavior for Emby Server using the configdata from a NAS/CIFs source.

my brain hurts.  I try not to dive into the Synology ShareFolder and DriveStation advanced permissions, but I might end up there.

I didn't try running the FSTAB+NAS shares over NFS instead of CIFS.  That is a possibility. CIFS has worked fine for a long time on the non-Premier version.

embyserver-2026-10-1.txt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...