Overview
The run command will execute the program listed after the double dash. It provides options for promoting the current node or for performing write forwarding using the HALT lock. See the migrations guide for details about promotion & write forwarding.
Usage
litefs run [arguments] -- CMD [ARGS...]
Arguments
-if-candidate
only execute if node is a candidate
-promote
promote node to primary
-with-halt-lock-on string
full database path to halt
Examples
Promote the local node to become the primary and then run Rails migrations:
litefs run -promote -- bin/rails db:migrate
Run Rails migrations on the /litefs/db database from any node and have those write forwarded back to the primary node:
litefs run -with-halt-lock-on /litefs/db -- bin/rails db:migrate