case 4204
This commit is contained in:
@@ -326,9 +326,11 @@ namespace AyaNova.Util
|
|||||||
internal static void DatabaseBackupCleanUp(int keepCount)
|
internal static void DatabaseBackupCleanUp(int keepCount)
|
||||||
{
|
{
|
||||||
if (keepCount < 1) keepCount = 1;
|
if (keepCount < 1) keepCount = 1;
|
||||||
|
|
||||||
|
//case 4204 prepended db and at with * to accomodate manual backups also being pruned
|
||||||
|
|
||||||
//Database backups
|
//Database backups
|
||||||
var BackupFileList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "db-*.backup");
|
var BackupFileList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "*db-*.backup");
|
||||||
if (BackupFileList.Count() > keepCount)
|
if (BackupFileList.Count() > keepCount)
|
||||||
{
|
{
|
||||||
//sort, skip newest x (keepcount) delete the rest
|
//sort, skip newest x (keepcount) delete the rest
|
||||||
@@ -341,7 +343,7 @@ namespace AyaNova.Util
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Attachment backups
|
//Attachment backups
|
||||||
BackupFileList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "at-*.zip");
|
BackupFileList = Directory.EnumerateFiles(ServerBootConfig.AYANOVA_BACKUP_FILES_PATH, "*at-*.zip");
|
||||||
if (BackupFileList.Count() > keepCount)
|
if (BackupFileList.Count() > keepCount)
|
||||||
{
|
{
|
||||||
//sort, skip newest x (keepcount) delete the rest
|
//sort, skip newest x (keepcount) delete the rest
|
||||||
@@ -353,6 +355,8 @@ namespace AyaNova.Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static long BackupFilesDriveAvailableSpace()
|
internal static long BackupFilesDriveAvailableSpace()
|
||||||
|
|||||||
Reference in New Issue
Block a user