From 3c8e3e8105a8fa49c21ec494d388c7d556a290e3 Mon Sep 17 00:00:00 2001 From: netbenix Date: Sat, 27 Nov 2021 20:54:27 +0100 Subject: [PATCH] Updated main.go --- main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 28e50f9..f880d80 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "github.com/google/uuid" "os" "scabiosa/Compressor" @@ -21,10 +22,11 @@ func main(){ destPath := checkTmpPath(config, backupItem.CreateLocalBackup) bakFile := Compressor.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath) - StorageTypes.UploadFile(storage, destPath + string(os.PathSeparator) + bakFile) + fmt.Printf(bakFile) + StorageTypes.UploadFile(storage, bakFile) if !backupItem.CreateLocalBackup { - _ = os.Remove(destPath + string(os.PathSeparator) + bakFile) + _ = os.Remove(bakFile) SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupItem.BackupName, SQL.SQLStage_DeleteTmp, SQL.REMOTE_NONE, "Deleted tmp file" ,time.Now()) } @@ -32,6 +34,8 @@ func main(){ } +//TODO Implement SQL Backup entries +//TODO SQL Log backupName is still != config.BackupMane func getTimeSuffix() string{ currTime := time.Now()