Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Request on Slack to document this discussion:
I can't find in the docs if --export is contemplated in incremental prepare
—
code looks like it applies incremental during the prepare stage an processes the export after all incremental processing.Server trx_lists_init_at_db_start path (10.6) differs for srv_operation == SRV_OPERATION_RESTORE but not srv_operation == SRV_OPERATION_RESTORE_EXPORT looks odd compared to how identical they look in the rest of the code base.
@marko
does this make sense?
—
A --prepare without --export does not deal with any undo logs. Rolling back incomplete transaction or purging the history of committed transactions would necessarily modify the state of the database and require log records to be written. That would cause "branching time" and make it impossible to apply another incremental backup on top of such additional changes. The --export will change the state of the database.
—
afaiu --export is mostly used to generate the .cfg files to eventually import single tablespacesIs it correct to say that you should use the --export option only when doing --prepare of the last incremental?Moreover --export of an earlier database backup (full or inc) might miss any ddl I guess
—
Yes, --export should be last, or should be executed on a copy of an earlier backup in case it is not
—
got it
—
--export could require rolling back incomplete transactions that had modified the table. It simply rolls back all incomplete transactions, so even if that step may not be strictly needed, it will likely create a "new branch of history" that does not correspond to the server that had been backed up.
—
clear, so maybe we could explain that in the doc : https://mariadb.com/kb/en/mariabackup-options/#-export?