mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-07 22:19:42 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3dce2017f8 | |||
|
|
ed2f1b8d9c | ||
| b64875df21 | |||
|
|
fc90507b3f |
@@ -32,7 +32,7 @@ services:
|
|||||||
- MAIL_SKIP_TLS=false
|
- MAIL_SKIP_TLS=false
|
||||||
## Time format for notification
|
## Time format for notification
|
||||||
- TIME_FORMAT=2006-01-02 at 15:04:05
|
- TIME_FORMAT=2006-01-02 at 15:04:05
|
||||||
## Backup reference, in case you want to identifier every backup instance
|
## Backup reference, in case you want to identify every backup instance
|
||||||
- BACKUP_REFERENCE=database/Paris cluster
|
- BACKUP_REFERENCE=database/Paris cluster
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
@@ -60,7 +60,7 @@ services:
|
|||||||
- TG_CHAT_ID=
|
- TG_CHAT_ID=
|
||||||
## Time format for notification
|
## Time format for notification
|
||||||
- TIME_FORMAT=2006-01-02 at 15:04:05
|
- TIME_FORMAT=2006-01-02 at 15:04:05
|
||||||
## Backup reference, in case you want to identifier every backup instance
|
## Backup reference, in case you want to identify every backup instance
|
||||||
- BACKUP_REFERENCE=database/Paris cluster
|
- BACKUP_REFERENCE=database/Paris cluster
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
|
|||||||
@@ -255,6 +255,9 @@ func localBackup(db *dbConfig, config *BackupConfig) {
|
|||||||
func s3Backup(db *dbConfig, config *BackupConfig) {
|
func s3Backup(db *dbConfig, config *BackupConfig) {
|
||||||
bucket := utils.GetEnvVariable("AWS_S3_BUCKET_NAME", "BUCKET_NAME")
|
bucket := utils.GetEnvVariable("AWS_S3_BUCKET_NAME", "BUCKET_NAME")
|
||||||
s3Path := utils.GetEnvVariable("AWS_S3_PATH", "S3_PATH")
|
s3Path := utils.GetEnvVariable("AWS_S3_PATH", "S3_PATH")
|
||||||
|
if config.remotePath != "" {
|
||||||
|
s3Path = config.remotePath
|
||||||
|
}
|
||||||
utils.Info("Backup database to s3 storage")
|
utils.Info("Backup database to s3 storage")
|
||||||
startTime = time.Now().Format(utils.TimeFormat())
|
startTime = time.Now().Format(utils.TimeFormat())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user