From d638d8d3a0b6af5d0e7bc5b75ff48a0634214b0c Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 1 Mar 2023 07:54:15 +0800 Subject: Remove backup script --- scripts/backup.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100755 scripts/backup.sh (limited to 'scripts') diff --git a/scripts/backup.sh b/scripts/backup.sh deleted file mode 100755 index ebb7e21..0000000 --- a/scripts/backup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Delete old snapshots -find "/snapshots/$USER" -maxdepth 1 -mtime +120 -type d -execdir rm -rf {} + - -exclude_file="$HOME/backup.exclude" - -OPT="-aPh" -EXCLUDE="--exclude-from=$exclude_file" -LATEST="/snapshots/$USER/latest" -LINK="--link-dest=$LATEST" -SRC="/home/$USER/" -SNAP="/snapshots/$USER/" -date=$(date "+%Y-%b-%d:_%T") - -[ ! -d $SNAP ] && mkdir -p $SNAP - - -rsync $OPT $LINK $EXCLUDE $SRC ${SNAP}$date - -rm -f $LATEST -ln -s ${SNAP}$date $LATEST -- cgit v1.2.3