Little refactor
This commit is contained in:
parent
a23791daa5
commit
63faa60a9c
4 changed files with 6 additions and 6 deletions
5
main.go
5
main.go
|
|
@ -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 {
|
||||
|
|
|
|||
Reference in a new issue