box: allow to specify the checkpoint to backup
Even though we store last box.cfg.checkpoint_count checkpoints, we can only restore to the last one, because the backup API only allows to backup the last checkpoint. This patch adds an optional argument to box.backup.start() which specifies the index of the checkpoint to backup. If it is omitted or is 0, box.backup.start() will return files corresponding to the last checkpoint. If it is 1, it will back the previous checkpoint, and so on. Closes #3410
Showing
- src/box/box.cc 14 additions, 8 deletionssrc/box/box.cc
- src/box/box.h 7 additions, 2 deletionssrc/box/box.h
- src/box/lua/init.c 7 additions, 1 deletionsrc/box/lua/init.c
- test/box/backup.result 159 additions, 71 deletionstest/box/backup.result
- test/box/backup.test.lua 88 additions, 62 deletionstest/box/backup.test.lua
Loading
Please register or sign in to comment