post restore
This commit is contained in:
parent
01ea0be63d
commit
e8a2141762
19
infrastructure/core/sc-asteria.yaml
Normal file
19
infrastructure/core/sc-asteria.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
allowVolumeExpansion: true
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: StorageClass
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
|
{"allowVolumeExpansion":true,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"asteria"},"parameters":{"diskSelector":"asteria","fromBackup":"","numberOfReplicas":"2","staleReplicaTimeout":"30"},"provisioner":"driver.longhorn.io"}
|
||||||
|
creationTimestamp: "2025-02-13T01:01:58Z"
|
||||||
|
name: asteria
|
||||||
|
resourceVersion: "928570"
|
||||||
|
uid: 12ec73a8-b209-473b-893e-150325fe89a0
|
||||||
|
parameters:
|
||||||
|
diskSelector: asteria
|
||||||
|
fromBackup: ""
|
||||||
|
numberOfReplicas: "2"
|
||||||
|
staleReplicaTimeout: "30"
|
||||||
|
provisioner: driver.longhorn.io
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
volumeBindingMode: Immediate
|
||||||
20
infrastructure/core/sc-astreae.yaml
Normal file
20
infrastructure/core/sc-astreae.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
allowVolumeExpansion: true
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
kind: StorageClass
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
|
{"allowVolumeExpansion":true,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"astreae"},"parameters":{"diskSelector":"astreae","fromBackup":"","numberOfReplicas":"3","staleReplicaTimeout":"30"},"provisioner":"driver.longhorn.io"}
|
||||||
|
storageclass.kubernetes.io/is-default-class: "true"
|
||||||
|
creationTimestamp: "2025-02-13T01:01:58Z"
|
||||||
|
name: astreae
|
||||||
|
resourceVersion: "932154"
|
||||||
|
uid: 79980351-4365-453b-9891-fa6895b41856
|
||||||
|
parameters:
|
||||||
|
diskSelector: astreae
|
||||||
|
fromBackup: ""
|
||||||
|
numberOfReplicas: "3"
|
||||||
|
staleReplicaTimeout: "30"
|
||||||
|
provisioner: driver.longhorn.io
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
volumeBindingMode: Immediate
|
||||||
22
scripts/gitea_recovery.fish
Executable file
22
scripts/gitea_recovery.fish
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
# run from your workstation
|
||||||
|
|
||||||
|
set jump titan-db # alias from ~/.ssh/config (192.168.22.10:2277)
|
||||||
|
|
||||||
|
# grab host list from titan-db’s ~/.ssh/config
|
||||||
|
set nodes (ssh $jump 'grep -E "^Host titan-" ~/.ssh/config | awk "{print \$2}"')
|
||||||
|
|
||||||
|
for n in $nodes
|
||||||
|
echo "=== $n ==="
|
||||||
|
# list volumes
|
||||||
|
ssh $jump "ssh $n 'ls /dev/longhorn'" 2>/dev/null
|
||||||
|
|
||||||
|
# look for app.ini or repos inside each volume
|
||||||
|
set vols (ssh $jump "ssh $n 'ls /dev/longhorn'" 2>/dev/null)
|
||||||
|
for v in $vols
|
||||||
|
ssh $jump "ssh $n 'test -e /dev/longhorn/$v && sudo mount -o ro /dev/longhorn/$v /mnt && \
|
||||||
|
(ls /mnt/gitea/conf/app.ini 2>/dev/null || true) && \
|
||||||
|
(ls /mnt/git/repositories 2>/dev/null || true); sudo umount /mnt'" 2>/dev/null
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user