chore: add convert backup size from bytes to Mib

This commit is contained in:
2024-12-10 09:58:39 +01:00
parent 6ec480acda
commit c89411cfa6
9 changed files with 13 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ func sshBackup(db *dbConfig, config *BackupConfig) {
// Send notification
utils.NotifySuccess(&utils.NotificationData{
File: finalFileName,
BackupSize: backupSize,
BackupSize: utils.BytesToMb(uint64(backupSize)),
Database: db.dbName,
Storage: config.storage,
BackupLocation: filepath.Join(config.remotePath, finalFileName),
@@ -204,7 +204,7 @@ func ftpBackup(db *dbConfig, config *BackupConfig) {
// Send notification
utils.NotifySuccess(&utils.NotificationData{
File: finalFileName,
BackupSize: backupSize,
BackupSize: utils.BytesToMb(uint64(backupSize)),
Database: db.dbName,
Storage: config.storage,
BackupLocation: filepath.Join(config.remotePath, finalFileName),