Jump to content

4.8.x Backups Failing


scharbag

Recommended Posts

scharbag

I have not been able to get Emby backups to work since it was updated to 4.8.x.  I just get the following error:

image.thumb.png.dba31f0d4183cd0ae7bd79f1b136928c.png

I have attached the log file from my system today after removing and re-installing the backup application (this did not seem to help).  I have tried setting the destination to different locations with no change to the outcome.

I am running 4.8.3.0 with Docker Compose on Ubuntu.  Not sure what is causing this to fail and I would appreciate any help at all.'

Cheers,

embyserver.txt

Link to comment
Share on other sites

Lessaj
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/livetv/seriestimers.json'.
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/livetv/timers.json'.

If they really don't exist you can always just create them manually, I don't use livetv but I have these files and all that's in them is:
 

[]

There's also an error for the DB being locked but I'm not sure if that's because of the previous errors or not.

	SQLitePCL.pretty.SQLiteException: Busy: database is locked

 

Edited by Lessaj
Link to comment
Share on other sites

Happy2Play

Dev will have to comment but Backup is having difficulty trying to back up the active database.

2024-03-09 17:31:46.685 Info SqliteItemRepository: Backing up to file /mnt/Warez/Emby/SparkysShit/Cache/cache/temp/c104a74604554b248391e118c13e4c33/library.db
2024-03-09 17:31:46.701 Error TaskManager: Error
	*** Error Report ***
	Version: 4.8.3.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 5.15.0-100-generic (buildd@lcy02-amd64-116) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #110-Ubun
	Framework: .NET 6.0.25
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 18
	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.ExecuteBackup(PluginConfiguration configuration, CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: SQLitePCL.pretty
	TargetSite: Void CheckOk(Int32)
	
2024-03-09 17:31:46.701 Info TaskManager: Emby Server Backup Failed after 0 minute(s) and 2 seconds

 

Link to comment
Share on other sites

Happy2Play
2 minutes ago, Lessaj said:
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/livetv/seriestimers.json'.
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/livetv/timers.json'.

If they really don't exist you can always just create them manually, I don't use livetv but I have these files and all that's in them is:
 

[]

There's also an error for the DB being locked but I'm not sure if that's because of the previous errors or not.

	SQLitePCL.pretty.SQLiteException: Busy: database is locked

 

First two are common as Emby looks for the files whether they exist or not.  @Luke

I know my (old) beta has empty json files there but my new install does not and gets the same System.IO.DirectoryNotFoundException: Could not find a part of the path for "seriestimers.json" and "timers.json"

  • Thanks 1
Link to comment
Share on other sites

I would try rebooting your machine and see if that resolves the issue. Thanks.

Link to comment
Share on other sites

scharbag
On 10/03/2024 at 13:12, Luke said:

I would try rebooting your machine and see if that resolves the issue. Thanks.

It is an Ubuntu 22.04 LTS server VM and Emby is running on Docker Compose.  I have pulled the latest and rebooted the VM many times since 4.8.x was released.  Emby works great, it just will not backup.

I will try another reboot JIC but I am pretty sure that this is not going to help.

Thanks for the ideas for sure!

Cheers,

  • Thanks 1
Link to comment
Share on other sites

scharbag
4 minutes ago, Luke said:

Let us know if that helps. Thanks.

Still fails.  I pulled and restarted the Dockers and it fails.  I rebooted the server and it still fails.  New log is attached but seems to have the same locked DB issue.

Hmmm...

embyserver.txt

Link to comment
Share on other sites

scharbag

I did find this:

 

and I notice that my permissions are this:

image.png.a1e2ed83dc854edaab026ff0bb17d6bf.png

Any chance I just need to chmod this to be something less restrictive?

Cheers,

Link to comment
Share on other sites

Try setting your backup path to something underneath /config

For example /config/backups

and see if that helps.

Link to comment
Share on other sites

scharbag
Posted (edited)
11 minutes ago, Luke said:

Try setting your backup path to something underneath /config

For example /config/backups

and see if that helps.

Tried sending it to /config and no joy.  Made a backups dir in config, still no joy.

image.thumb.png.3bcd2c9cf784880960396ac2ff888765.png

Odd thing is is that it does make a set of files:

image.thumb.png.faf6407caac29795513b1f921a466186.png

But I do not think they are complete.  Still showing the DB as being locked in the logs.

Argh...  I would reinstall and restore but... I have not had backups for a while.

And it does seem to write the same number of files regardless of the target - so I do not think that is the issue.

Edited by scharbag
Link to comment
Share on other sites

scharbag
Posted (edited)

This is not very fun any more...  :(

I just wannnnnnnna be able to back up my snoose... :)

Edited by scharbag
Link to comment
Share on other sites

is /config pointing to a network path?

Link to comment
Share on other sites

scharbag
Posted (edited)
7 minutes ago, Luke said:

is /config pointing to a network path?

No - it is in ~/.config/ in Ubuntu and is defined in the Compose file.

Cheers,

Edited by scharbag
Link to comment
Share on other sites

And what is it mapped to on the host system?

Link to comment
Share on other sites

scharbag

/home/sparky/.config/ on the local Ubuntu file system.

Link to comment
Share on other sites

scharbag

I notice this in a fresh install:

image.thumb.png.ec08cfbae0efd4e09e683fda339ca008.png

Where as my server has this:

image.png.ebf7a07307385fe5c24ae6f10423f77b.png

Not sure why the difference.  Anything to be worried about here?  If I wanted to start fresh, can I copy users and folders into the new install without doing a full proper backup and restore?  Would love to retain watch history, user images and passwords...

Cheers,

Link to comment
Share on other sites

Happy2Play

Looks like your backup is happening within Emby Programdata folder.  Personally, would not want that to happen but don't believe backup cleanup will go rogue deleting the wrong folder for your install.

Link to comment
Share on other sites

scharbag
Posted (edited)
4 minutes ago, Happy2Play said:

Looks like your backup is happening within Emby Programdata folder.  Personally, would not want that to happen but don't believe backup cleanup will go rogue deleting the wrong folder for your install.

in the fresh server?  I just pointed the backups there for grins to see if they worked.  The backup works fine - so that extra directory in quotes is a backup artifact?  I guess it is - so, that is not something that I need to worry abooot.

😐

Edited by scharbag
Link to comment
Share on other sites

Happy2Play
1 minute ago, scharbag said:

in the fresh server?  I just pointed the backups there for grins to see if they worked.  They did - so that extra directory in quotes is a backup artifact?

It is normal but depending on how many dbs you have configured to save.  But would suggest their own backup folder outside of Emby or at least not in Emby programdata.

image.png.ab51cf43ad8f879242bd358e8d200760.png

Link to comment
Share on other sites

scharbag
1 minute ago, Happy2Play said:

It is normal but depending on how many dbs you have configured to save.  But would suggest their own backup folder outside of Emby or at least not in Emby programdata.

image.png.ab51cf43ad8f879242bd358e8d200760.png

Yeah - fixed on the test system - backups go to an HTPC fstab mounted share and they work just fine.

Still at a loss why my production systems (2 of them) will not allow backups due to the DB issue it seems.  Any way to punt something and force a DB rebuild?

Cheers,

Link to comment
Share on other sites

Happy2Play
1 minute ago, scharbag said:

Yeah - fixed on the test system - backups go to an HTPC fstab mounted share and they work just fine.

Still at a loss why my production systems (2 of them) will not allow backups due to the DB issue it seems.  Any way to punt something and force a DB rebuild?

Cheers,

Sort of but ensure you have a backup to restore userdata of if you are luck you might be able to export userdatas table from old db to new db.

Shutdown Emby and rename/move the library.db, start Emby and kick off a library scan.

Link to comment
Share on other sites

scharbag
1 hour ago, Happy2Play said:

Sort of but ensure you have a backup to restore userdata of if you are luck you might be able to export userdatas table from old db to new db.

Shutdown Emby and rename/move the library.db, start Emby and kick off a library scan.

LOL, I would love to have a backup...  But I cannot make a backup...  I can make a copy, but that is all.

Link to comment
Share on other sites

scharbag

Arg - I have tried a lot of things but as soon as I use the library.db file from my prod system, it starts to give me that same error.

I realllllly do not wanna redo the setup of this... again.

Argh.

Link to comment
Share on other sites

Happy2Play
18 minutes ago, scharbag said:

Arg - I have tried a lot of things but as soon as I use the library.db file from my prod system, it starts to give me that same error.

I realllllly do not wanna redo the setup of this... again.

Argh.

I am a little confused but would suggest the plugin cannot pause the database to back it up via your setup/system?  So in theory you can shutdown Emby and backup the database manually and reuse it correct.

Link to comment
Share on other sites

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...