Little refactor

This commit is contained in:
netbenix 2021-11-23 08:57:01 +01:00
parent a23791daa5
commit 63faa60a9c
4 changed files with 6 additions and 6 deletions

View file

@ -3,6 +3,7 @@ package main
import (
"github.com/google/uuid"
"os"
"scabiosa/Compressor"
"scabiosa/Logging"
"scabiosa/SQL"
"scabiosa/StorageTypes"
@ -13,13 +14,13 @@ import (
func main(){
config := Tools.GetConfig()
SQL.CreateDefaultTables(SQL.GetMariaDBInstance())
SQL.CreateDefaultTables(SQL.GetSQLInstance())
for _, backupItem := range config.FolderToBackup{
storage := StorageTypes.CheckStorageType(backupItem.StorageType)
destPath := checkTmpPath(config, backupItem.CreateLocalBackup)
bakFile := Tools.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath)
bakFile := Compressor.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath)
StorageTypes.UploadFile(storage, destPath + string(os.PathSeparator) + bakFile)
if !backupItem.CreateLocalBackup {