Chaged static sql instance to dynamic instance
This commit is contained in:
parent
6f95fedbc1
commit
a23791daa5
3 changed files with 8 additions and 14 deletions
5
main.go
5
main.go
|
|
@ -19,13 +19,12 @@ func main(){
|
|||
storage := StorageTypes.CheckStorageType(backupItem.StorageType)
|
||||
destPath := checkTmpPath(config, backupItem.CreateLocalBackup)
|
||||
|
||||
bakFile := CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath)
|
||||
bakFile := Tools.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath)
|
||||
StorageTypes.UploadFile(storage, destPath + string(os.PathSeparator) + bakFile)
|
||||
|
||||
if !backupItem.CreateLocalBackup {
|
||||
_ = os.Remove(destPath + string(os.PathSeparator) + bakFile)
|
||||
//TODO Remove Hardcoded SQL Instance
|
||||
SQL.NewLogEntry(SQL.GetMariaDBInstance(), uuid.New(), SQL.LogInfo, backupItem.BackupName, SQL.SQLStage_DeleteTmp, SQL.REMOTE_NONE, "Deleted tmp file" ,time.Now())
|
||||
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupItem.BackupName, SQL.SQLStage_DeleteTmp, SQL.REMOTE_NONE, "Deleted tmp file" ,time.Now())
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue