From a1fb5f702da484bf984c70926aede12db3ef7991 Mon Sep 17 00:00:00 2001 From: tofasthacker Date: Wed, 14 Jun 2023 11:39:43 -0400 Subject: [PATCH] first commit --- README.md | 0 backup | 35 +++++++++++++++++++++++++++++++++++ backup.bak | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 README.md create mode 100755 backup create mode 100644 backup.bak diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/backup b/backup new file mode 100755 index 0000000..22eda7a --- /dev/null +++ b/backup @@ -0,0 +1,35 @@ +#!/bin/bash + +echo ' + ________ ________ ________ ___ __ ___ ___ ________ _________ ________ ________ ___ +|\ __ \|\ __ \|\ ____\|\ \|\ \ |\ \|\ \|\ __ \ |\___ ___\\ __ \|\ __ \|\ \ +\ \ \|\ /\ \ \|\ \ \ \___|\ \ \/ /|\ \ \\\ \ \ \|\ \ \|___ \ \_\ \ \|\ \ \ \|\ \ \ \ + \ \ __ \ \ __ \ \ \ \ \ ___ \ \ \\\ \ \ ____\ \ \ \ \ \ \\\ \ \ \\\ \ \ \ + \ \ \|\ \ \ \ \ \ \ \____\ \ \\ \ \ \ \\\ \ \ \___| \ \ \ \ \ \\\ \ \ \\\ \ \ \_____ + \ \_______\ \__\ \__\ \_______\ \__\\ \__\ \_______\ \__\ \ \__\ \ \_______\ \_______\ \_______\ + \|_______|\|__|\|__|\|_______|\|__| \|__|\|_______|\|__| \|__| \|_______|\|_______|\|_______|' +echo "" + +echo 'backing up the following folders:' +echo -e "\e[32m-------------------------------------------" +cat *.bak + +echo "" +echo "" + +echo -e "\e[0mStarting Backup" + +tar -cvf /nas/share/backup.tar ./*.bak + +while read folder; do + # list the contents of each folder + echo -e "\e[32mbackingup: $folder" + tar -rf /nas/share/backup.tar $folder &>/dev/null +done < *.bak + +echo "" +#echo -e "\e[0mCompressing backup" + +#gzip /nas/share/backup.tar + +echo -e "\e[0mBackup Done" diff --git a/backup.bak b/backup.bak new file mode 100644 index 0000000..0ce4a40 --- /dev/null +++ b/backup.bak @@ -0,0 +1,3 @@ +/var/www +/etc/apache2 +/home/brickman