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