Skip to main content

backup-now

Run an ad-hoc restic backup now and show the resulting snapshot Arguments: [--dry-run].

Source facts

Repository
Agents-Store/codex-plugins
Last source activity
November 1, 2026 at 02:46
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
backup-now
description
Run an ad-hoc restic backup now and show the resulting snapshot Arguments: [--dry-run].
# restic Backup Now Trigger an immediate, off-schedule backup using the existing configured script — useful before a risky change or to confirm a freshly-set-up backup works. Method and rules: the `restic-dev:backup-script` skill. Parse `[--dry-run]` from "$ARGUMENTS". ## Process 1. **Preflight** — confirm the setup exists: ```bash test -x /usr/local/sbin/restic-backup.sh && test -f /root/.restic/r2.env \ || echo "Backup not set up yet — use the restic-backup-engineer agent / setup skills first." ``` 2. **Dry run** (if `--dry-run`): ```bash set -a; . /root/.restic/r2.env; set +a restic backup --dry-run --files-from /etc/restic/backup-paths.txt --exclude-file /etc/restic/excludes.txt -v ``` Report what would be backed up, then stop. 3. **Run** (otherwise) — prefer the real script so DB dumps + retention run too: ```bash /usr/local/sbin/restic-backup.sh ``` 4. **Show the result:** ```bash set -a; . /root/.restic/r2.env; set +a restic snapshots --latest 1 restic stats latest ``` 5. **Report** the new snapshot (id, time, size). If `backup` exits 3, note that's a partial success (unreadable files, or on restic ≥ 0.19 a missing source path — snapshot still created), not a failure; if the script itself ends non-zero after the backup (e.g. `forget` exit 3 = a snapshot could not be removed), that is a real failure. On a real failure (1/10/11/12 or a failed `forget`), point to the `troubleshoot` skill. Concurrency: if the scheduled run might be active, avoid a second simultaneous run (repo lock). Check `restic list locks` first if unsure.
View on GitHub