diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/backup.sh | 22 |
1 files changed, 0 insertions, 22 deletions
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 |