From 1a9c8483f89f5d2c2163087bcf23091af12f9465 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Thu, 12 Sep 2024 06:23:57 +0200 Subject: [PATCH 1/2] chore: add code comment --- pkg/backup.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/backup.go b/pkg/backup.go index 2989fae..6bdcb74 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -247,6 +247,8 @@ func s3Backup(db *dbConfig, backupFileName string, disableCompression bool, prun //Delete temp deleteTemp() } + +// sshBackup backup database to SSH remote server func sshBackup(db *dbConfig, backupFileName, remotePath string, disableCompression bool, prune bool, backupRetention int, encrypt bool) { utils.Info("Backup database to Remote server") //Backup database @@ -282,6 +284,8 @@ func sshBackup(db *dbConfig, backupFileName, remotePath string, disableCompressi //Delete temp deleteTemp() } + +// encryptBackup encrypt backup func encryptBackup(backupFileName string) { gpgPassphrase := os.Getenv("GPG_PASSPHRASE") err := Encrypt(filepath.Join(tmpPath, backupFileName), gpgPassphrase) From 3476c6f52931ef7f944e94b7e0f3e21da5a98e07 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Thu, 12 Sep 2024 06:33:38 +0200 Subject: [PATCH 2/2] docs: update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 218777a..24fbdf5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # MySQL Backup -MySQL Backup is a Docker container image that can be used to backup and restore MySQL database. It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, and SSH compatible storage. +MySQL Backup is a Docker container image that can be used to backup, restore and migrate MySQL database. It supports local storage, AWS S3 or any S3 Alternatives for Object Storage, and SSH compatible storage. It also supports __encrypting__ your backups using GPG. The [jkaninda/mysql-bkup](https://hub.docker.com/r/jkaninda/mysql-bkup) Docker image can be deployed on Docker, Docker Swarm and Kubernetes.