Update Backup to use key to check for old backups no longer supported

This commit is contained in:
advplyr
2023-07-14 14:20:35 -05:00
parent 1b97582975
commit c5a4f63670
3 changed files with 15 additions and 8 deletions

View File

@ -180,8 +180,10 @@ class BackupManager {
const backup = new Backup({ details, fullPath: fullFilePath })
if (!backup.serverVersion) {
Logger.error(`[BackupManager] Old unsupported backup was found "${backup.fullPath}"`)
if (!backup.serverVersion) { // Backups before v2
Logger.error(`[BackupManager] Old unsupported backup was found "${backup.filename}"`)
} else if (!backup.key) { // Backups before sqlite migration
Logger.warn(`[BackupManager] Old unsupported backup was found "${backup.filename}" (pre sqlite migration)`)
}
backup.fileSize = await getFileSize(backup.fullPath)