Reading backup cursors documentation here: http://source.wiredtiger.com/3.0.0/backup.htmlI want to clarify one thing: is it true that backup created by the described procedure will mirror DB state at the moment of the most recent checkpoint made before backup cursor creation?
1. What If I don't call log_flush after checkpoint and before opening backup cursor?
Is there any chance that new log records created after checkpoint will made into the backup?
2. What will happen if log_flush is called after creating backup cursor but before log files copied? I guess in this case copied log files will contain log records created after backup cursor was opened. Will those new records be applied to the DB when I open DB from the backup copy?
--Igor
You received this message because you are subscribed to the Google Groups "wiredtiger-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wiredtiger-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The database file may grow in size during the copy, and the file copy should not consider that an error. Blocks appended to the file after the copy starts can be safely ignored, that is, it is correct for the copy to determine an initial size of the file and then copy that many bytes, ignoring any bytes appended after the backup cursor was opened.
Hi Igor,If there are log files present in the backup copy any valid records in those log files will be applied on startup. It is not necessary to explicitly call log_flush after the checkpoint.On Mon, Sep 24, 2018 at 11:09 PM <igor.sol...@percona.com> wrote:1. What If I don't call log_flush after checkpoint and before opening backup cursor?You don't need to call log_flush to ensure checkpoint is completed.Is there any chance that new log records created after checkpoint will made into the backup?Yes - if you startup the backup with recovery enabled all transactions that have written log records will be applied to the backup database.2. What will happen if log_flush is called after creating backup cursor but before log files copied? I guess in this case copied log files will contain log records created after backup cursor was opened. Will those new records be applied to the DB when I open DB from the backup copy?It is intended that log records are applied to the backup, bringing the state of the database to the last durable logged transaction when files were copied. You can disable that behavior by starting up with logging disabled in the backup copy of the database.
Documentation says:The database file may grow in size during the copy, and the file copy should not consider that an error. Blocks appended to the file after the copy starts can be safely ignored, that is, it is correct for the copy to determine an initial size of the file and then copy that many bytes, ignoring any bytes appended after the backup cursor was opened.What if my copy procedure does not ignore bytes appended after the backup cursor was opened? (It just copies all files without any truncation). Will those new data blocks be ignored when I start from backup? From your explanation I know that nothing will be ignored from the log files but is this also true for regular data files? Until now I was thinking there is some metadata describing which data existed at the moment of the last checkpoint but now I am not sure.
It is intended that log records are applied to the backup, bringing the state of the database to the last durable logged transaction when files were copied. You can disable that behavior by starting up with logging disabled in the backup copy of the database.Can I achieve the same result if my backup procedure just won't copy log files?