一键导入
volsync-restore
Restore a VolSync-backed PVC from a previous snapshot for any app in this cluster
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Restore a VolSync-backed PVC from a previous snapshot for any app in this cluster
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Enforces staged execution discipline on large tasks: a written stage plan, delegation to named fable agents where the runtime supports it, a failable verification check at each stage, and a skeptical self-review before delivery. Trigger when the user explicitly asks ("do this thoroughly", "be systematic", "deep work mode") OR when the task objectively spans multiple files, multiple sources, or multiple sessions. Do NOT trigger on ordinary multi-step requests that a direct attempt handles fine. For a run pinned to a specific model, use fable-opus, fable-sonnet, or fable-haiku instead. Always-on guardrails (verify-before-flag, warning batching, sed safety) live in the companion execution-guardrails skill.
Run Kopiur S3 backups alongside VolSync NFS, verify over days, then cutover with full restore from S3
Migrate an app's PVC backup from VolSync to Kopiur with zero data loss
Scaffold a new app-template application for this home-ops repository
Systematically investigate cluster issues starting from events, following the Flux pipeline down to pod logs
Analyze GitOps repo structure for ordering issues, broken references, missing dependencies, and anti-patterns
| name | volsync-restore |
| description | Restore a VolSync-backed PVC from a previous snapshot for any app in this cluster |
| argument-hint | [namespace/app] [snapshot-index] - e.g. services/karakeep 1 |
MISSION: Restore a VolSync-backed application PVC from a previous snapshot.
SCOPE: $ARGUMENTS
Provide namespace/app and optionally a snapshot index (0 = latest, 1 = previous, etc.)
ReplicationSource in its namespaceflux get hr volsync -n storage)# List ReplicationSources
kubectl get replicationsource -n <namespace>
# Check last sync time and status
kubectl get replicationsource <app> -n <namespace> -o yaml | grep -A10 "lastSyncTime\|lastSyncDuration\|latestMoverPod"
flux suspend ks <app> -n <namespace>
flux suspend hr <app> -n <namespace>
# Scale down to release RWO PVC
kubectl scale deployment -n <namespace> <app> --replicas=0
# Wait for pod termination
kubectl wait pod -n <namespace> -l app.kubernetes.io/name=<app> --for=delete --timeout=2m
# Get source PVC details
SOURCE_PVC=$(kubectl get replicationsource <app> -n <namespace> -o jsonpath='{.spec.sourcePVC}')
STORAGE_CLASS=$(kubectl get pvc $SOURCE_PVC -n <namespace> -o jsonpath='{.spec.storageClassName}')
CAPACITY=$(kubectl get pvc $SOURCE_PVC -n <namespace> -o jsonpath='{.spec.resources.requests.storage}')
ACCESS_MODE=$(kubectl get pvc $SOURCE_PVC -n <namespace> -o jsonpath='{.spec.accessModes[0]}')
Apply a ReplicationDestination (replace <previous> with snapshot index, 0=latest):
apiVersion: volsync.backube/v1alpha1
kind: ReplicationDestination
metadata:
name: <app>-restore
namespace: <namespace>
spec:
trigger:
manual: restore-$(date +%s)
restic:
repository: <app>-volsync-secret # matches ReplicationSource secret
destinationPVC: <app> # target PVC name
storageClassName: <storage-class>
accessModes: [<access-mode>]
copyMethod: Direct
previous: <snapshot-index> # 0=latest, 1=previous, etc.
moverSecurityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
kubectl wait job -n <namespace> volsync-dst-<app>-restore --for=condition=complete --timeout=60m
kubectl logs -n <namespace> -l app.kubernetes.io/component=mover,app.kubernetes.io/name=<app>-restore
kubectl delete replicationdestination -n <namespace> <app>-restore
flux resume ks <app> -n <namespace>
flux resume hr <app> -n <namespace>
flux reconcile hr <app> -n <namespace> --force
kubectl wait pod -n <namespace> -l app.kubernetes.io/name=<app> --for=condition=ready --timeout=5m
kubectl patch replicationsource <app> -n <namespace> --type merge \
-p '{"spec":{"trigger":{"manual":"post-restore-'$(date +%s)'"}}}'
ClusterSecretStore: akeyless-secret-store)ceph-block (RWO)storage568 unless app specifies otherwise (check defaultPodOptions.securityContext)