6cb48f372b
- restore.sh: after folder+venv+frontend restore, runs assets/themes/install-theme.sh to rebuild the desktop wiring - backup.sh: snapshots live xfconf + GTK 3/4 settings.ini into assets/themes/restore-snapshot/ before the router mirror, so the backup captures actual state (install-theme.sh stays the applier) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
52 lines
1.3 KiB
Bash
Executable File
52 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
NEXUS_ROOT="$HOME/nexus-core"
|
|
|
|
detect_requirements() {
|
|
if command -v nvidia-smi &>/dev/null || lspci 2>/dev/null | grep -qi nvidia; then
|
|
echo "nvidia_requirements.txt"
|
|
else
|
|
echo "amd_requirements.txt"
|
|
fi
|
|
}
|
|
|
|
echo "Restoring Nexus from router..."
|
|
rsync -avz --delete \
|
|
--exclude='Promethean/' \
|
|
--exclude='models/blobs/' \
|
|
--exclude='ollama/' \
|
|
--exclude='interface/web/node_modules/' \
|
|
--exclude='interface/web/dist/' \
|
|
--exclude='runtime/' \
|
|
--exclude='__pycache__/' \
|
|
--exclude='*.pyc' \
|
|
-e ssh \
|
|
"router:/tmp/mnt/Wingdrive2/nexus-backup/" "$NEXUS_ROOT/"
|
|
|
|
echo ""
|
|
echo "Rebuilding Python environment..."
|
|
req=$(detect_requirements)
|
|
if [ -f "$NEXUS_ROOT/$req" ]; then
|
|
"$NEXUS_ROOT/Promethean/bin/pip" install -r "$NEXUS_ROOT/$req"
|
|
else
|
|
echo "Warning: $req not found — skipping pip install."
|
|
fi
|
|
|
|
echo ""
|
|
echo "Rebuilding frontend dependencies..."
|
|
cd "$NEXUS_ROOT/interface/web" && npm install
|
|
|
|
echo ""
|
|
echo "Restoring NexusOS desktop theme..."
|
|
theme_installer="$NEXUS_ROOT/assets/themes/install-theme.sh"
|
|
if [ -x "$theme_installer" ]; then
|
|
"$theme_installer"
|
|
elif [ -f "$theme_installer" ]; then
|
|
bash "$theme_installer"
|
|
else
|
|
echo "Warning: $theme_installer not found — skipping theme restore."
|
|
fi
|
|
|
|
echo ""
|
|
echo "Restore complete. Nexus is ready to start."
|