tarantool / tarantool/doc

Document backup API enhancements

Open Beginner friendly
#5,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

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.
  • expires_at - Unix-time when backup will be expired. nil if
    expiration time is infinite.
    Requested by @nshy in https://github.com/tarantool/tarantool/commit/b39d837caafa01e9fad93c99e8178983dc421659.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the Tarantool documentation for the existing box.backup.start() API reference and its surrounding backup material. Document checkpoint rotation, incremental and TTL options, compat.box_backup_default_ttl, and box.backup.info(), including its fields and example output. Done when the documented behavior matches the issue and the new API details are easy to find.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.