Stop the daemon, back up the database, install 0.7.18, then start the daemon again; your agents keep running through the restart. Run it with the same OpenRig home and database as the daemon you're upgrading.
Stop the daemon, back up the database, install 0.7.18, then start the daemon. Your agents keep running through a daemon restart; don't use rig down, which ends them. Each step runs only if the one before it succeeded. The backup goes to a new, dated file, with its -wal file beside it when there is one, so running the block again never overwrites an earlier backup. If you installed OpenRig another way, use that in place of the npm install line. Before running the block or any recovery command, use the same OpenRig home (OPENRIG_HOME, or legacy RIGGED_HOME) as the daemon you are upgrading. If that daemon was started with --db, or with OPENRIG_DB (legacy RIGGED_DB) set differently from this shell, replace the block's DB= line with its actual database path instead of using rig config get db.path, and pass that path with --db to every rig daemon start below, including recovery. The config command reads this shell's configuration, not the running daemon's launch settings. If a step fails, nothing after it runs: fix what it reports, then run the whole block again. If rig daemon stop fails and rig daemon status then says "Daemon stopped", run the block from the DB= line. If it says "Daemon PID is absent", run rig daemon start, then the whole block again. Keep the backup, and its -wal file, until 0.7.18 is running well.
rig daemon stop &&
DB="$(rig config get db.path)" &&
BACKUP="$DB.before-0.7.18-$(date -u +%Y%m%dT%H%M%SZ)" &&
{ [ ! -e "$BACKUP" ] || { echo "$BACKUP already exists and is kept; run the block again." >&2; false; }; } &&
cp "$DB" "$BACKUP" &&
{ [ ! -e "$DB-wal" ] || cp "$DB-wal" "$BACKUP-wal"; } &&
echo "Database backed up to $BACKUP" &&
npm install -g @openrig/cli@0.7.18 &&
rig daemon start- Release
- OpenRig 0.7.18 release notes