From a3c34264754a99a567b7be2250a052845aa5ec10 Mon Sep 17 00:00:00 2001 From: netbenix Date: Thu, 23 Dec 2021 13:15:41 +0100 Subject: [PATCH 1/3] fix(SQL): LocalTargetPath is now 'NONE' if localbackup is false --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 4e15540..aeb5053 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,8 @@ func main(){ } if !backupItem.CreateLocalBackup && backupItem.RemoteStorageType != "none"{ + backupItem.LocalTargetPath = "NONE" + _ = os.Remove(bakFile) SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupItem.BackupName, SQL.SQLStage_DeleteTmp, SQL.REMOTE_NONE, "Deleted tmp file" ,time.Now()) } From 32e980b95c7ea9867840a819e0863242c89b3f0a Mon Sep 17 00:00:00 2001 From: netbenix Date: Thu, 23 Dec 2021 13:16:07 +0100 Subject: [PATCH 2/3] style(main.go): Corrected formatting --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index aeb5053..5f590a0 100644 --- a/main.go +++ b/main.go @@ -46,7 +46,7 @@ func main(){ backupItem.CreateLocalBackup = true backupItem.RemoteTargetPath = "NONE" } - SQL.NewBackupEntry(SQL.GetSQLInstance(), backupItem.BackupName, time.Now(), backupItem.CreateLocalBackup, backupItem.FolderPath, StorageTypes.CheckRemoteStorageType(backupItem.RemoteStorageType), backupItem.RemoteTargetPath, backupItem.LocalTargetPath) + SQL.NewBackupEntry(SQL.GetSQLInstance(), backupItem.BackupName, time.Now(), backupItem.CreateLocalBackup, backupItem.FolderPath, StorageTypes.CheckRemoteStorageType(backupItem.RemoteStorageType), backupItem.RemoteTargetPath, backupItem.LocalTargetPath) } } From 4291a9e6c24fc9f2a9cba4bdfa3b1f10c1f01b95 Mon Sep 17 00:00:00 2001 From: netbenix Date: Thu, 23 Dec 2021 13:16:26 +0100 Subject: [PATCH 3/3] docs(README): Updated Config example --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 55b0b6b..794faa2 100644 --- a/README.md +++ b/README.md @@ -57,5 +57,6 @@ Trello board: [Click me!](https://trello.com/b/6zWLE6Jm) | backupName | string | .bak file name | | folderPath | string | Path to folder which should be backed up | | remoteStorageType | string | See [StorageTypes](#storage-types) | -| targetPath | string | Sets the targetPath for local backups | +| remoteTargetPath | string | Sets the remotePath for remote backups | +| localTargetPath | string | Sets the targetPath for local backups | | createLocalBackup | boolean | Sets if .bak file should also be saved locally | \ No newline at end of file