Updated SQL
This commit is contained in:
parent
fcbaaa092f
commit
675a8dafb3
5 changed files with 32 additions and 21 deletions
6
main.go
6
main.go
|
|
@ -21,15 +21,15 @@ func main(){
|
|||
storage := StorageTypes.CheckStorageType(backupItem.StorageType)
|
||||
destPath := checkTmpPath(config, backupItem.CreateLocalBackup)
|
||||
|
||||
bakFile := Compressor.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath)
|
||||
bakFile := Compressor.CreateBakFile(backupItem.BackupName + getTimeSuffix(), backupItem.FolderPath, destPath, backupItem.BackupName)
|
||||
fmt.Printf(bakFile)
|
||||
StorageTypes.UploadFile(storage, bakFile)
|
||||
StorageTypes.UploadFile(storage, bakFile, backupItem.BackupName)
|
||||
|
||||
if !backupItem.CreateLocalBackup {
|
||||
_ = os.Remove(bakFile)
|
||||
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupItem.BackupName, SQL.SQLStage_DeleteTmp, SQL.REMOTE_NONE, "Deleted tmp file" ,time.Now())
|
||||
}
|
||||
|
||||
SQL.NewBackupEntry(SQL.GetSQLInstance(), backupItem.BackupName, time.Now(), backupItem.CreateLocalBackup, backupItem.FolderPath, StorageTypes.CheckRemoteStorageType(backupItem.StorageType), StorageTypes.GetAzureStorage().TargetDirectory)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue