refactor: add Telegram env in Dockerfile, move telegram notification to utils
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
func StartBackup(cmd *cobra.Command) {
|
||||
utils.Welcome()
|
||||
intro()
|
||||
//Set env
|
||||
utils.SetEnv("STORAGE_PATH", storagePath)
|
||||
utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION")
|
||||
@@ -119,6 +119,13 @@ func scheduledMode(db *dbConfig, storage string) {
|
||||
}
|
||||
|
||||
}
|
||||
func intro() {
|
||||
fmt.Println()
|
||||
fmt.Println("**********************************")
|
||||
fmt.Println(" PostgreSQL Backup ")
|
||||
fmt.Println(" @Copyright © 2024 jkaninda ")
|
||||
fmt.Println("***********************************")
|
||||
}
|
||||
|
||||
// BackupDatabase backup database
|
||||
func BackupDatabase(db *dbConfig, backupFileName string, disableCompression bool) {
|
||||
|
||||
Reference in New Issue
Block a user