gitops/scripts/k3s-cluster/k8s_restore_all.sh
2025-05-23 21:19:18 +08:00

22 lines
744 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -e
REPO_BASE_URL="https://raw.githubusercontent.com/<your-org-or-username>/<your-repo>/main/scripts"
echo "🚀 [Step 1/5] 安装 K3s 和 Helm..."
curl -fsSL ${REPO_BASE_URL}/install_k3s_and_helm.sh | bash
echo "🚀 [Step 2/5] 部署 Velero..."
curl -fsSL ${REPO_BASE_URL}/deploy_velero.sh | bash
echo "🚀 [Step 3/5] 节点打标签并解除控制面 Taint..."
curl -fsSL ${REPO_BASE_URL}/label_k8s_node.sh | bash
echo "🚀 [Step 4/5] 生成备份配置文件..."
curl -fsSL ${REPO_BASE_URL}/generate_backup_config.sh | bash
echo "🚀 [Step 5/5] 执行恢复restore..."
# 支持参数backup / restore <tag> / list / delete <tag>
curl -fsSL ${REPO_BASE_URL}/run_backup_tool.sh | bash -s restore 202503211725