Automatic Tarantool Recovery

Important

We highly recommend that you turn off your Tarantool servers properly in every unstable situation. This measure will prevent data corruption, so there will be no need in the functionality described in this section.

Warning

Be extremely careful with enabling this functionality as it may lead to silent data loss.

If your system architecture doesn’t imply uninterrupted availability of Tarantool servers, it is recommended to enable automatic database recovery. In this case, each time an error occurs while reading a snapshot or xlog file, Tarantool will skip invalid records, read as much data as possible, and re-build the file.

To enable automatic database recovery, do the following:

  1. For each Tarantool shard, open the configuration file /etc/tarantool/instances.available/shard-*.lua and uncomment force_recovery = true.

    sudo vi /etc/tarantool/instances.available/shard-*.lua
    
    
    box.cfg{
    
        force_recovery = true,
    }
    
  2. Restart the shards.

    systemctl restart tarantool@shard-*