From a8d775ff00d9920971fb9b7e9cadb7a9347f825e Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 21 Jan 2023 09:20:56 +0800 Subject: Update backup script --- scripts/backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/backup.sh b/scripts/backup.sh index ec595ed..ebb7e21 100755 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -3,14 +3,14 @@ # Delete old snapshots find "/snapshots/$USER" -maxdepth 1 -mtime +120 -type d -execdir rm -rf {} + -exclude_file="$HOME/.backup-exclude-list.txt" +exclude_file="$HOME/backup.exclude" OPT="-aPh" EXCLUDE="--exclude-from=$exclude_file" -LINK="--link-dest=/snapshots/$USER/latest" +LATEST="/snapshots/$USER/latest" +LINK="--link-dest=$LATEST" SRC="/home/$USER/" SNAP="/snapshots/$USER/" -LATEST="/snapshots/$USER/latest" date=$(date "+%Y-%b-%d:_%T") [ ! -d $SNAP ] && mkdir -p $SNAP -- cgit v1.2.3