chore: add convert bytes to a human-readable string with the appropriate unit (bytes, MiB, or GiB)
This commit is contained in:
@@ -89,11 +89,12 @@ func s3Backup(db *dbConfig, config *BackupConfig) {
|
||||
}
|
||||
}
|
||||
utils.Info("Backup saved in %s", filepath.Join(config.remotePath, finalFileName))
|
||||
utils.Info("Backup size: %s", utils.ConvertBytes(uint64(backupSize)))
|
||||
utils.Info("Uploading backup archive to remote storage S3 ... done ")
|
||||
// Send notification
|
||||
utils.NotifySuccess(&utils.NotificationData{
|
||||
File: finalFileName,
|
||||
BackupSize: utils.BytesToMb(uint64(backupSize)),
|
||||
BackupSize: utils.ConvertBytes(uint64(backupSize)),
|
||||
Database: db.dbName,
|
||||
Storage: config.storage,
|
||||
BackupLocation: filepath.Join(config.remotePath, finalFileName),
|
||||
|
||||
Reference in New Issue
Block a user