11 Commits

Author SHA1 Message Date
Bo Tran
91e002b1f2 Improve the detect backup was created when parse log
Task: #43209
Story: #2009176
Change-Id: I6aff0d185991db77b17a4f23084de6734b2b3a6c
2022-01-21 10:34:32 +07:00
Lingxian Kong
02971d850b Add periodic task to remove postgres archived wal files
* Added a periodic task for postgresql datastore to clean up the
  archived WAL files.
* Added a check when creating incremental backups for postgresql.
* A new container image ``openstacktrove/db-backup-postgresql:1.1.2``
  is uploaded to docker hub.

Story: 2009066
Task: 42871
Change-Id: I235e2abf8c0405e143ded6fb48017d596b8b41a1
2021-07-23 22:16:20 +12:00
Lingxian Kong
b050996b9f Use bridge network for db container
- Changed the network mode of database container to "bridge" and exposed
  the service ports.
- Use socket file to connect with the database.
- Upgrade the backup container image for postgressql.

Change-Id: Id5b119f8a474befc3a2cd6e061bbffc4ae5f7bb6
2021-06-22 19:10:14 +12:00
Lingxian Kong
bd2b256a37 Fix restore encrypted backup
For the backups created prior to Victoria which may be encrypted, the restore
function in Victoria or later release should correctly decrypt the backup data.

Backup encryption from Victoria is disabled.

Bump the backup docker image tag to 1.1.0.

Change-Id: I7abf5563b22ab1914fa355c089a3793da07f2215
2020-10-29 23:19:03 +13:00
Lingxian Kong
d1af33f17b Support mysql 8.0
* MySQL 5.7 and MySQL 8.0 need different percona-xtrabackup package version.
  Added Percona XtraBackup 8 support for MySQL 8.x backup and restore.
* Construct different backup container image names for MySQL 5.7 and MySQL 8.0
  based on the default option value.
* Two docker images are uploaded for backup/restore:
  openstacktrove/db-backup-mysql5.7:1.0.0 and
  openstacktrove/db-backup-mysql8.0:1.0.0. Trove guest agent can automatically
  choose the approriate one based on the datastore version.
* Added option "secure-file-priv=NULL" in MySQL config template to fix
  https://github.com/docker-library/mysql/issues/541.
* Stop using IDENTIFIED BY in GRANT clause (also REVOKE). Starting with MySQL 8
  creating a user implicitly using the GRANT command is not supported.

Story: #2008275
Task: #41143

Change-Id: Ibdec63324b1b39ba9b8a38dbe529da17bbb06767
2020-10-23 23:50:39 +13:00
Lingxian Kong
7537b3255e [Backup] Ignore 404 error when deleting swift objects
Change-Id: I32c6ad56ebbd77dbafb2f956c78082b944fc5a22
2020-09-17 11:32:44 +12:00
Lingxian Kong
5482c54645 [Postgresql] Create replica
Change-Id: Ia00032074dc44a6fbfc1e2d5ab16d1734a1a732c
2020-09-11 13:48:32 +12:00
Lingxian Kong
4fb41b5198 Postgresql: Backup and restore
Change-Id: Icf08b7dc82ce501d82b45cf5412256a43716b6ae
2020-09-07 20:40:56 +12:00
Lingxian Kong
43d7aec774 Improve docker image for database backup/restore
* Decrease the image size by not installing unnecessary packages.
* Move the option 'backup_docker_image' to separate database config
  section.

Change-Id: I3362e1f8a7dc21b89c060352f2db2f138c16db07
2020-09-02 09:37:01 +12:00
Lingxian Kong
828e873846 Support backup strategy API
Change-Id: I0ddd7214dae6e29ddfaf045fdb282f4980a8afff
2020-07-17 11:35:53 +12:00
Lingxian Kong
aa1d4d2246 Datastore containerization
Significant changes:

* Using docker image to install datastore.
* Datastore image is common to different datastores.
* Using backup docker image to do backup and restore.
* Support MariaDB replication
* Set most of the functional jobs as non-voting as nested
  virtualization is not supported in CI.

Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
2020-05-27 10:31:50 +12:00