Fix Backups (#750)
* Fixed an issue where backups were failing due to files being in config directory * Changed up the exception messages to be more clear when a unique constraint fails on adding a new series. * Added the actual index that is causing the conflict.
This commit is contained in:
parent
a24ca2b46b
commit
ae5c6594e4
3 changed files with 18 additions and 24 deletions
|
@ -89,7 +89,7 @@ namespace API.Services.Tasks
|
|||
_logger.LogDebug("Backing up to {BackupDirectory}", backupDirectory);
|
||||
if (!DirectoryService.ExistOrCreate(backupDirectory))
|
||||
{
|
||||
_logger.LogError("Could not write to {BackupDirectory}; aborting backup", backupDirectory);
|
||||
_logger.LogCritical("Could not write to {BackupDirectory}; aborting backup", backupDirectory);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ namespace API.Services.Tasks
|
|||
DirectoryService.ClearDirectory(tempDirectory);
|
||||
|
||||
_directoryService.CopyFilesToDirectory(
|
||||
_backupFiles.Select(file => Path.Join(Directory.GetCurrentDirectory(), file)).ToList(), tempDirectory);
|
||||
_backupFiles.Select(file => Path.Join(DirectoryService.ConfigDirectory, file)).ToList(), tempDirectory);
|
||||
|
||||
await CopyCoverImagesToBackupDirectory(tempDirectory);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue