From 1f6c5f1e7cf28369184f4800bce7591d24012487 Mon Sep 17 00:00:00 2001 From: mango Date: Mon, 2 Feb 2026 09:49:34 +0800 Subject: [PATCH] =?UTF-8?q?v2.6:=20=E5=BF=AB=E7=85=A7=E6=8E=92=E9=99=A4SSH?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E9=81=BF=E5=85=8D=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=97=B6=E6=96=AD=E8=BF=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vps-snapshot.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vps-snapshot.sh b/vps-snapshot.sh index 495fff2..3c572a1 100755 --- a/vps-snapshot.sh +++ b/vps-snapshot.sh @@ -255,6 +255,9 @@ create_snapshot() { excludes+=" --exclude=/run --exclude=/tmp --exclude=/mnt" excludes+=" --exclude=/media --exclude=/lost+found" excludes+=" --exclude=${LOCAL_DIR} --exclude=/var/cache" + excludes+=" --exclude=/etc/ssh --exclude=/root/.ssh" + excludes+=" --exclude=/etc/shadow --exclude=/etc/passwd" + excludes+=" --exclude=/etc/hostname --exclude=/etc/hosts" if [ "$BACKUP_DIRS" = "/" ]; then tar $excludes -czf "$snapshot_path" / 2>/dev/null || true