From d7ce42204a05c55aca10783d4e60724132d2701f Mon Sep 17 00:00:00 2001 From: tofasthacker Date: Mon, 19 Feb 2024 16:58:10 -0500 Subject: [PATCH] added date stamp --- backup | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backup b/backup index a2f3d36..87beaf0 100755 --- a/backup +++ b/backup @@ -1,6 +1,6 @@ #!/bin/bash -BACKUP_LOCATION="/nas/share/backup.tar" +BACKUP_LOCATION="/nas/share/backup-$(date +%Y-%m-%d).tar" COMPRESS=false rm -f $BACKUP_LOCATION @@ -28,7 +28,7 @@ tar -pcvf $BACKUP_LOCATION ./*.bak while read folder; do # list the contents of each folder - echo -e "\e[32mbackingup: $folder" + echo -e "\e[32mBacking Up: $folder" tar -rfp $BACKUP_LOCATION $folder &>/dev/null done < *.bak @@ -36,11 +36,11 @@ echo "" -if [ "$COMPRESS" = true ]; +if [ "$COMPRESS" = true ]; then - echo -e "\e[0mCompressing backup" + echo -e "\e[0mCompressing Backup" gzip $BACKUP_LOCATION - echo -e "\e[0mRemoving Uncompressed backup" + echo -e "\e[0mRemoving Uncompressed Backup" rm -f $BACKUP_LOCATION fi