1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Ignore data backup errors during upgrade

This commit is contained in:
Keivan Beigi 2014-12-17 14:40:10 -08:00
parent 264bb66c16
commit 9b715ee078

View File

@ -1,4 +1,5 @@
using NLog; using System;
using NLog;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
@ -29,8 +30,17 @@ public void Backup()
var backupFolderAppData = _appFolderInfo.GetUpdateBackUpAppDataFolder(); var backupFolderAppData = _appFolderInfo.GetUpdateBackUpAppDataFolder();
_diskProvider.CreateFolder(backupFolderAppData); _diskProvider.CreateFolder(backupFolderAppData);
_diskProvider.CopyFile(_appFolderInfo.GetConfigPath(), _appFolderInfo.GetUpdateBackupConfigFile(), true);
_diskProvider.CopyFile(_appFolderInfo.GetNzbDroneDatabase(), _appFolderInfo.GetUpdateBackupDatabase(), true); try
{
_diskProvider.CopyFile(_appFolderInfo.GetConfigPath(), _appFolderInfo.GetUpdateBackupConfigFile(), true);
_diskProvider.CopyFile(_appFolderInfo.GetNzbDroneDatabase(), _appFolderInfo.GetUpdateBackupDatabase(),
true);
}
catch (Exception e)
{
_logger.ErrorException("Couldn't create a data backup", e);
}
} }
} }
} }