case 4460

This commit is contained in:
2023-03-07 00:31:44 +00:00
parent d4c7e719e2
commit e6876bf5b9
2 changed files with 20 additions and 4 deletions

View File

@@ -326,8 +326,17 @@ namespace AyaNova.Util
internal static void DatabaseBackupCleanUp(int keepCount)
{
if (keepCount < 1) keepCount = 1;
//case 4204 prepended db and at with * to accomodate manual backups also being pruned
//case 4460 rename manual- file pattern to support removal of manual- prepend on demand backup
//this ensures that pruning happens properly
var renameList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "manual-*");
if (renameList.Count() > 0)
{
foreach (string renameFile in renameList)
{
File.Move(renameFile, renameFile.Replace("manual-", ""), true);
}
}
//Database backups
var BackupFileList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "*db-*.backup");
@@ -355,7 +364,7 @@ namespace AyaNova.Util
}
}
}