Issue backing up DB - Possible Corrupt - No Working Backup

Sonarr version (exact version): 3.0.6.1196
Mono version (if Sonarr is not running on Windows): N/A
** .net Version (Windows): 4.8.0
OS: Windows 10 Pro
Debug logs: [v3.0.6.1196] System.Data.SQLite.SQLiteException (0x80004005): disk I/O error
disk I/O error
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Marr.Data.DataMapper.QueryToGraph[T](String sql, EntityGraph graph, List1 childrenToLoad) in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:line 624 at Marr.Data.QGen.QueryBuilder1.ToList() in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\QueryBuilder.cs:line 275
at Marr.Data.QGen.SortBuilder1.ToList() in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\SortBuilder.cs:line 176 at NzbDrone.Core.Datastore.BasicRepository1.GetPaged(PagingSpec1 pagingSpec) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 257 at NzbDrone.Core.History.HistoryService.Paged(PagingSpec1 pagingSpec) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\History\HistoryService.cs:line 54
at NzbDrone.Core.Analytics.AnalyticsService.get_InstallIsActive() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Analytics\AnalyticsService.cs:line 33
at NzbDrone.Core.Update.UpdatePackageProvider.GetLatestUpdate(String branch, Version currentVersion) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Update\UpdatePackageProvider.cs:line 43
at NzbDrone.Core.Update.CheckUpdateService.AvailableUpdate() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Update\UpdateCheckService.cs:line 26
at NzbDrone.Core.Update.InstallUpdateService.GetUpdatePackage(CommandTrigger updateTrigger) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Update\InstallUpdateService.cs:line 223
at NzbDrone.Core.Update.InstallUpdateService.Execute(ApplicationUpdateCheckCommand message) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Update\InstallUpdateService.cs:line 255
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](TCommand command, CommandModel commandModel) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 96
at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommands() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 41

21-3-29 14:03:42.4|Info|LifecycleService|Shutdown requested.
21-3-29 14:03:42.4|Info|CommandExecutor|Shutting down task execution
21-3-29 14:03:42.4|Info|Scheduler|Shutting down scheduler
21-3-29 14:03:42.4|Info|ServiceProvider|Stopping Sonarr Service…
21-3-29 14:03:42.4|Info|ServiceProvider|Service is currently Running
21-3-29 14:03:42.4|Info|NzbDroneServiceFactory|Attempting to stop application.
21-3-29 14:03:42.4|Info|OwinHostController|Attempting to stop OWIN host
21-3-29 14:03:42.4|Info|OwinHostController|Host has stopped
21-3-29 14:03:42.4|Info|NzbDroneServiceFactory|Application has finished stop routine.
21-3-29 14:03:42.4|Info|ConsoleApp|Exiting main.
21-3-29 14:11:09.7|Info|Bootstrap|Starting Sonarr - C:\ProgramData\Sonarr\bin\Sonarr.exe - Version 3.0.6.1196
21-3-29 14:11:10.1|Info|Router|Application mode: Interactive
21-3-29 14:11:10.3|Info|MigrationLogger|*** Checking database for required migrations data source=C:\ProgramData\Sonarr\sonarr.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
21-3-29 14:11:10.4|Info|MigrationLogger|*** Checking database for required migrations data source=C:\ProgramData\Sonarr\logs.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
21-3-29 14:11:10.8|Info|OwinHostController|Listening on the following URLs:
21-3-29 14:11:10.8|Info|OwinHostController| http://*:8989/
21-3-29 14:11:11.4|Info|SonarrBootstrapper|Starting Web Server
21-3-29 14:11:11.9|Info|BrowserService|Starting default browser. http://localhost:8989
21-3-29 14:11:11.9|Info|ProcessProvider|Opening URL [http://localhost:8989]
21-3-29 14:11:33.3|Info|BackupService|Starting Backup
21-3-29 14:11:33.7|Error|CommandExecutor|Error occurred while executing task Backup

[v3.0.6.1196] System.Data.SQLite.SQLiteException (0x80004005): disk I/O error
not an error
at System.Data.SQLite.SQLite3.StepBackup(SQLiteBackup backup, Int32 nPage, Boolean& retry)
at System.Data.SQLite.SQLiteConnection.BackupDatabase(SQLiteConnection destination, String destinationName, String sourceName, Int32 pages, SQLiteBackupCallback callback, Int32 retryMilliseconds)
at NzbDrone.Core.Backup.MakeDatabaseBackup.BackupDatabase(IDatabase database, String targetDirectory) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Backup\MakeDatabaseBackup.cs:line 45
at NzbDrone.Core.Backup.BackupService.BackupDatabase() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Backup\BackupService.cs:line 192
at NzbDrone.Core.Backup.BackupService.Backup(BackupType backupType) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Backup\BackupService.cs:line 83
at NzbDrone.Core.Backup.BackupService.Execute(BackupCommand message) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Backup\BackupService.cs:line 242
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](TCommand command, CommandModel commandModel) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 96
at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommands() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 41

21-3-29 14:11:42.5|Info|RssSyncService|Starting RSS Sync
21-3-29 14:11:42.6|Info|DownloadDecisionMaker|Processing 200 releases
Description of issue: When using the UI to do a backup of the DB - I get a failed message and the logs output the above. If I try to manually copy over the DB file and everything else, I get a failed to read from file or source disk. I have ran disk checker on my WD NVME SSD drive and it reports no issues, ran a slew of tests with WD Tools, Acronis, Corsair, and Seatools and all report the drive is fine. I have a backup from 1/21/2021 which I can use but I was seeing if there is anything more I can do. I have added a few TV shows since then. Worst case, I can take a screenshot of what I have added since then and re-add it.

Logs link: https://drive.google.com/drive/folders/1wcIoWFAGUkiAxoWOwJ8OpJOAM4BPpzRo?usp=sharing

I have included the original log and then I added a Debugging log as requested. Sorry about that. Also uploaded the full log file from C:\ProgramData\Sonarr\Logs

You could try to repair the DB:

alt instructions on the servarr wiki https://wiki.servarr.com/Useful_Tools#Recovering_a_Corrupt_DB

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.