v2.8: 排除整个/etc目录避免SSH问题
This commit is contained in:
@@ -255,10 +255,7 @@ 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"
|
||||
excludes+=" --exclude=/etc/pam.d"
|
||||
excludes+=" --exclude=/etc"
|
||||
|
||||
if [ "$BACKUP_DIRS" = "/" ]; then
|
||||
tar $excludes -czf "$snapshot_path" / 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user