1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

New: Backup options and restoration

This commit is contained in:
Mark McDowall
2018-01-12 17:52:42 -08:00
committed by Taloth Saldono
parent fdbe45c0ab
commit 81d6c0d210
22 changed files with 427 additions and 93 deletions
@@ -12,10 +12,10 @@ namespace NzbDrone.Common.Extensions
{
private const string APP_CONFIG_FILE = "config.xml";
private const string DB = "sonarr.db";
private const string DB_RESTORE = "sonarr.restore";
private const string LOG_DB = "logs.db";
private const string NLOG_CONFIG_FILE = "nlog.config";
private const string UPDATE_CLIENT_EXE = "Sonarr.Update.exe";
private const string BACKUP_FOLDER = "Backups";
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "sonarr_update" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "Sonarr" + Path.DirectorySeparatorChar;
@@ -274,16 +274,16 @@ namespace NzbDrone.Common.Extensions
return Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_CLIENT_EXE);
}
public static string GetBackupFolder(this IAppFolderInfo appFolderInfo)
{
return Path.Combine(GetAppDataPath(appFolderInfo), BACKUP_FOLDER);
}
public static string GetDatabase(this IAppFolderInfo appFolderInfo)
{
return Path.Combine(GetAppDataPath(appFolderInfo), DB);
}
public static string GetDatabaseRestore(this IAppFolderInfo appFolderInfo)
{
return Path.Combine(GetAppDataPath(appFolderInfo), DB_RESTORE);
}
public static string GetLogDatabase(this IAppFolderInfo appFolderInfo)
{
return Path.Combine(GetAppDataPath(appFolderInfo), LOG_DB);