Add mysql backup using bin-log
Currently freezer is able to execute mysql backup only if the file system is on top of lvm. If lvm is not available, then freezer cannot be used to execute mysql backup. Also in order to execute backup with lvm, the Mysql DB needs to be flushed and locked for few seconds (duration depends on the amount of pending writes, it may take minutes on busy DBs). For all this reason freezer needs to support also mysql backup using bin-log. A wrapper around Percona XtraBackup can be implemented to include this feature
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Low
- Drafter:
- Fausto Marzi
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
-
Unknown
- Milestone target:
- None
- Started by
- Completed by
Whiteboard
Backup:
1) Check if innobackupex is abailable. If not raise exception
2) User the current mysql backup function, en call the function backup_
according the specified command line
3) Check if a corresponding backup already exists in swift
4) If it exists, download the manifest and get the lsn of the last backup
The lsn will be passed as argument for innobackupex to execute incremental backup
5) Execute the mysql backup in the specified directory
Existing functions of filesystem backup can be used here, as what really
change would be the use of innobackupex script rather then tar.
Also the tar meta data file doesn't need to be uploaded, as to execute the incremental
only the lsn is required by innobackupes
6) If specified, encrypt the data and upload the stream on Swift.
7) Write stats in the logs and successfully exit.
Restore:
TBD