• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 27945418978

22 Jun 2026 10:12AM UTC coverage: 87.687% (+0.004%) from 87.683%
27945418978

push

github

sergepetrenko
box: support ttl in box.backup.start

And also add box.backup.info().expires_at and compat option
`box_backup_default_ttl` to control default expiration time for
backups.

Part of #11729

@TarantoolBot document
Title: Document backup API enhancements
Product: Tarantool
Since: 3.8

Now `box.backup.start()` when it is called to backup latest checkpoint
rotates xlog and include it into backup, so backup is done at the moment
of calling this API.

Now `box.backup.start()` can take a table with options instead of integer
specifying checkpoint number. In this case backup is based on latest
checkpoint and includes rotated xlog. Supported options are:

- `from_vclock`, if it is specified the backup will be incremental, i.e. it
  will only include xlogs since given vclock. The vclock should point to
  the end of the previous full or incremental backup (`vclock` field
  of box.backup.info()).
- `ttl` sets expiration time for a backup. After this time the backup
  will be stopped. If not set then default expiration time will be used
  (see `compat.box_backup_default_ttl`).

New `box_backup_default_ttl` compat option controls default expiration
time for a backup. It is infinite when compat is set to `old` (versions
3.x default) and 1 hour when it is set to `new` (versions 4.x default).

`box.backup.info()` is intoroduced to query details about backup in
progress. It returns `nil` if there is such. Example output:

```
tarantool> box.backup.info()
---
- type: full
  files:
  - ./00000000000000000004.snap
  vclock: {1: 4}
  expires_at: 1781082529.6392
...
```

It's fields are:

- `files` - backup files, same list as `box.backup.start()` returns.
- `type` - `'incremental'` or `'full'`.
- `vclock` - vclock of the last statement in the backup (incremental
  backup can be empty, in this case it is `from_vclock` specified on
  start).
- `prev_vclock` - vclock of previous backup (`from_vclock` specified on
   start) for incremental backups, `nil` for full backups.
- `exp... (continued)

70838 of 119080 branches covered (59.49%)

27 of 27 new or added lines in 2 files covered. (100.0%)

137 existing lines in 15 files now uncovered.

106490 of 121443 relevant lines covered (87.69%)

1380372.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.73
/src/lua/utils.c


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc