feat(MariaDB): BackupEntry now always gets an Update on multiple fields
This commit is contained in:
parent
af2124dbc3
commit
a0d8162f3e
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ func (mariadb MariaDBConnector) newBackupEntry(backupName string, lastBackup tim
|
||||||
hostname, _ := os.Hostname()
|
hostname, _ := os.Hostname()
|
||||||
|
|
||||||
if checkIfBackupEntryExist(db, mariadb, backupName, hostname){
|
if checkIfBackupEntryExist(db, mariadb, backupName, hostname){
|
||||||
_, err := db.Query("UPDATE `" + mariadb.Database + "`.Backups SET LastBackup = ? WHERE Hostname = ? AND BackupName = ?;", lastBackup, hostname, backupName)
|
_, err := db.Query("UPDATE `" + mariadb.Database + "`.Backups SET LastBackup = ?, LocalBackup = ?, RemoteStorage = ?, RemotePath = ?, LocalPath = ? WHERE Hostname = ? AND BackupName = ?;",lastBackup, localBackup, strconv.FormatInt(int64(storageType), 10), remotePath, localPath, hostname, backupName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatal(err)
|
logger.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue