diff options
author | Guangxiong Lin <[email protected]> | 2023-01-21 09:20:56 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2023-01-21 09:20:56 +0800 |
commit | a8d775ff00d9920971fb9b7e9cadb7a9347f825e (patch) | |
tree | 732ceaac1b22c2295bcf1b40648c4127646c8ca1 /scripts/backup.sh | |
parent | 3df5d72ed900fd64cb95cc62bd45fd1eef491a45 (diff) | |
download | dotfiles-a8d775ff00d9920971fb9b7e9cadb7a9347f825e.tar.gz dotfiles-a8d775ff00d9920971fb9b7e9cadb7a9347f825e.tar.bz2 dotfiles-a8d775ff00d9920971fb9b7e9cadb7a9347f825e.zip |
Update backup script
Diffstat (limited to 'scripts/backup.sh')
-rwxr-xr-x | scripts/backup.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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 |