Vega SillyTavern cutover: preflight and data staging #2

Closed
opened 2026-07-01 12:30:33 +01:00 by nimmo · 0 comments
Owner

Goal

Reach a safe pre-cutover state for moving SillyTavern on vega from the legacy Docker stack to the native NixOS service, while preserving a simple rollback path.

This issue is intended to be self-contained and executable without referring to a local project note.

Preconditions

  • The Vega configuration containing nixosConfig.sillytavern.enable and nixosConfig.newt.enable builds successfully.
  • secrets/newt.yaml contains real vega/env credentials.
  • Pangolin has a separate Newt client reserved for the native SillyTavern route.

Data Preservation Notes

Keep /srv/stacks/sillytavern intact during the first cutover. It is the rollback source of truth.

The running container reports /home/nimmo/stacks/sillytavern as its bind-mount source; on Vega these paths resolve to the same inode.

Acceptance Checklist

  • Confirm the build and secret prerequisites above.
  • Mask sillytavern.service before the first activation so native state directories can be created without starting against empty state.
  • Rebuild vega with the SillyTavern and Newt configuration active.
  • Create /srv/stacks-archive/sillytavern-pre-native for rollback.
  • Pre-stage data, extensions, and plugins from /srv/stacks/sillytavern into /var/lib/SillyTavern with sillytavern:sillytavern ownership.
  • Leave /srv/stacks/sillytavern intact as the rollback source of truth.

Procedure

Mask SillyTavern before the first activation so NixOS can create its dedicated account and state directories without allowing the service to start against empty state. Newt should start normally.

sudo systemctl mask sillytavern.service
sudo nixos-rebuild switch --flake /home/nimmo/nixos-config#vega

Create the rollback archive directory:

sudo install -d /srv/stacks-archive/sillytavern-pre-native

Pre-stage the large data directories while the legacy service is still running. NixOS activation should already have created the destination directories with sillytavern:sillytavern ownership.

This copy is not the final consistent snapshot.

sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/data/ \
  /var/lib/SillyTavern/data/
sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/extensions/ \
  /var/lib/SillyTavern/extensions/
sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/plugins/ \
  /var/lib/SillyTavern/plugins/

Notes

  • The pre-stage copy is intentionally not the final consistent snapshot.
  • Do not copy over the managed /var/lib/SillyTavern/config.yaml symlink at this stage.
  • Do not delete or mutate the legacy stack directory during this phase.
## Goal Reach a safe pre-cutover state for moving SillyTavern on `vega` from the legacy Docker stack to the native NixOS service, while preserving a simple rollback path. This issue is intended to be self-contained and executable without referring to a local project note. ## Preconditions - The Vega configuration containing `nixosConfig.sillytavern.enable` and `nixosConfig.newt.enable` builds successfully. - `secrets/newt.yaml` contains real `vega/env` credentials. - Pangolin has a separate Newt client reserved for the native `SillyTavern` route. ## Data Preservation Notes Keep `/srv/stacks/sillytavern` intact during the first cutover. It is the rollback source of truth. The running container reports `/home/nimmo/stacks/sillytavern` as its bind-mount source; on Vega these paths resolve to the same inode. ## Acceptance Checklist - Confirm the build and secret prerequisites above. - Mask `sillytavern.service` before the first activation so native state directories can be created without starting against empty state. - Rebuild `vega` with the SillyTavern and Newt configuration active. - Create `/srv/stacks-archive/sillytavern-pre-native` for rollback. - Pre-stage `data`, `extensions`, and `plugins` from `/srv/stacks/sillytavern` into `/var/lib/SillyTavern` with `sillytavern:sillytavern` ownership. - Leave `/srv/stacks/sillytavern` intact as the rollback source of truth. ## Procedure Mask SillyTavern before the first activation so NixOS can create its dedicated account and state directories without allowing the service to start against empty state. Newt should start normally. ```bash sudo systemctl mask sillytavern.service sudo nixos-rebuild switch --flake /home/nimmo/nixos-config#vega ``` Create the rollback archive directory: ```bash sudo install -d /srv/stacks-archive/sillytavern-pre-native ``` Pre-stage the large data directories while the legacy service is still running. NixOS activation should already have created the destination directories with `sillytavern:sillytavern` ownership. This copy is not the final consistent snapshot. ```bash sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/data/ \ /var/lib/SillyTavern/data/ sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/extensions/ \ /var/lib/SillyTavern/extensions/ sudo rsync -aHAX --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/plugins/ \ /var/lib/SillyTavern/plugins/ ``` ## Notes - The pre-stage copy is intentionally not the final consistent snapshot. - Do not copy over the managed `/var/lib/SillyTavern/config.yaml` symlink at this stage. - Do not delete or mutate the legacy stack directory during this phase.
nimmo added this to the (deleted) project 2026-07-01 15:51:54 +01:00
nimmo closed this issue 2026-07-11 10:03:45 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#2
No description provided.