GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — agentic-dev-setup/scripts/restore-data.sh at main · elvinlab/agentic-dev-setup

Expand file tree

/

restore-data.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
38 lines (31 loc) · 1.35 KB
/

restore-data.sh

Copy path

File metadata and controls

executable file
·
38 lines (31 loc) · 1.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# Restores secrets and data from a backup created with backup.sh
# Usage: ./scripts/restore-data.sh ~/ai-backup-YYYYMMDD-HHMM.tar.gz.age
# IMPORTANT: with OmniRoute and OpenCode CLOSED.
set -euo pipefail
[ $# -eq 1 ] || { echo "Usage: $0 <file.tar.gz.age>"; exit 1; }
command -v age >/dev/null || { echo "Missing age: sudo pacman -S age"; exit 1; }
WORK="$(mktemp -d)"
trap 'rm -rf "$WORK"' EXIT
echo "Decrypting (it will ask for the password)…"
age -d "$1" | tar -C "$WORK" -xzf -
restore() { # restore <relative-in-backup> <destination>
if [ -e "$WORK/$1" ]; then
mkdir -p "$(dirname "$2")"
[ -e "$2" ] && mv "$2" "$2.pre-restore.$(date +%s)"
cp -a "$WORK/$1" "$2"
echo " ✔ $2"
else
echo " – (not in backup) $1"
fi
}
restore omniroute/.env "$HOME/.omniroute/.env"
restore omniroute/storage.sqlite "$HOME/.omniroute/storage.sqlite"
restore engram/engram.db "$HOME/.engram/engram.db"
restore secrets "$HOME/.config/secrets"
restore herdr "$HOME/.config/herdr"
chmod 700 "$HOME/.config/secrets" 2>/dev/null || true
chmod 600 "$HOME/.config/secrets/"* 2>/dev/null || true
echo "References (opencode.json, CLAUDE.md, bashrc) were intentionally not restored."
echo "If you need them, decrypt again and review them in: reference/"
echo "✔ Data restore complete."
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.