Backup MySQL databases before purging stack

This commit is contained in:
VirtuBox
2019-09-01 23:47:13 +02:00
parent 619d83116c
commit 29d2af4d7e
2 changed files with 13 additions and 0 deletions

View File

@@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### v3.9.x - [Unreleased]
#### Added
- Sendmail stack to send WordPress welcome email properly
- Backup all MySQL databases before removing/purging MySQL stack
#### Changed
- do not terminate stack install process on errors

View File

@@ -692,6 +692,10 @@ class WOStackController(CementBaseController):
if (set(["nginx-custom"]).issubset(set(apt_packages))):
WOService.stop_service(self, 'nginx')
if (set(WOVariables.wo_mysql).issubset(set(apt_packages))):
WOMysql.backupAll(self)
WOService.stop_service(self, 'mysql')
# Netdata uninstaller
if (set(['/var/lib/wo/tmp/'
'kickstart.sh']).issubset(set(packages))):
@@ -912,6 +916,10 @@ class WOStackController(CementBaseController):
if (set(["fail2ban"]).issubset(set(apt_packages))):
WOService.stop_service(self, 'fail2ban')
if (set(WOVariables.wo_mysql).issubset(set(apt_packages))):
WOMysql.backupAll(self)
WOService.stop_service(self, 'mysql')
# Netdata uninstaller
if (set(['/var/lib/wo/tmp/'
'kickstart.sh']).issubset(set(packages))):