tarantool / doc

Tarantool documentation
https://www.tarantool.io/en/doc/
Other
14 stars 43 forks source link

Document a way to check `backup` status #2660

Open opomuc opened 2 years ago

opomuc commented 2 years ago

Product: Tarantool Audience/target: admin Root document: https://www.tarantool.io/en/doc/latest/book/admin/backups/ ? SME: @ alyapunov


This is an example on how to check if Tarantool backup mode is enabled:

unix/:./tmp/run/router.control> box.backup.start()
---
- - /home/user/.../tmp/data/router/00000000000000000000.snap
...

unix/:./tmp/run/.router.control> box.info.gc()
---
- signature: 0
  checkpoint_is_in_progress: false
  consumers: []
  is_paused: false
  vclock: {}
  checkpoints:
  - references:
    - backup
    vclock: {}
    signature: 0
...

unix/:./tmp/run/router.control> box.backup.stop()
---
...

unix/:./tmp/run/router.control> box.info.gc()
---
- signature: 0
  checkpoint_is_in_progress: false
  consumers: []
  is_paused: false
  vclock: {}
  checkpoints:
  - references: []
    vclock: {}
    signature: 0
...

unix/:./tmp/run/router.control>

courtesy of @no1seman

Oneliner according to console output above:

box.info.gc().checkpoints[1].references[1] == 'backup'

This is a bit uncomfortable way, but we have what we have. Can you check if it is the only way? If so -- document it?

opomuc commented 6 months ago

@veod32 как считаешь, эта информация нужна в доке?