first commit

This commit is contained in:
tofasthacker 2023-06-14 11:39:43 -04:00
commit a1fb5f702d
3 changed files with 38 additions and 0 deletions

0
README.md Normal file
View File

35
backup Executable file
View File

@ -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"

3
backup.bak Normal file
View File

@ -0,0 +1,3 @@
/var/www
/etc/apache2
/home/brickman