Incremental backups are not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Percona Cluster Charm |
Triaged
|
Low
|
Unassigned |
Bug Description
It looks like incremental backups are not working when created through the "backup" action:
$ juju run-action percona-cluster/0 backup basedir=
unit-percona-
id: 7b947748-
results:
outcome: Success
time-completed: "2019-05-23 12:23:08"
status: completed
timing:
completed: 2019-05-23 12:23:08 +0000 UTC
enqueued: 2019-05-23 12:23:04 +0000 UTC
started: 2019-05-23 12:23:06 +0000 UTC
unit: percona-cluster/0
The action succeeds, however, a full backup is taken instead:
$ juju ssh percona-cluster/0 sudo cat /var/backups/
backup_type = full-backuped
from_lsn = 0
to_lsn = 2572120
last_lsn = 2572129
compact = 0
recover_binlog_info = 0
Connection to 172.16.0.170 closed.
This is due to a fact that the '--incremental-
$ innobackupex --incremental /data/backups --incremental-
At the moment only the '--incremental' parameter is passed:
cat percona-
...
if incremental:
...
Indeed, according to the documentation (https:/ /www.percona. com/doc/ percona- xtrabackup) the basedir= BASEDIR is needed and should point to the last full back-up that was done.
--incremental=
This would mean the action finding the most recent full backup from the currently passed basedir (in the action) and using that (in all probability). Alternatively, the user would need to specify the incremental basedir (which would mean inspecting the 'basedir' that had previously been used in the last full backup action) to be able to pass that value. And in order to do that, an action would be needed (probably) to list the full backup base dirs relative to a passed 'root basedir' that is used in the full backup.
Which means, this is a bit more complicated than a simple bug fix; I recommend a spec be written to propose how the feature of incremental backups be handled, and perhaps, in the meantime, remove the incremental option as it doesn't work.