You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Enter full paths of folders to include in our backup archive. (You should change these)
9
9
backuppaths=(
10
-
/home/user
11
-
/root
12
-
/etc
13
-
/usr/share/coreruleset
14
-
/usr/share/grc
15
-
/var
10
+
/home/user
11
+
/root
12
+
/etc
13
+
/usr/share/coreruleset
14
+
/usr/share/grc
15
+
/var
16
16
/lib/systemd/system
17
17
)
18
18
###### End Of Configuration ######
19
19
20
20
# sudo is required
21
21
if [[ $UID!= 0 ]];then
22
-
printf"\e[1mThis script needs sudo privileges. You will also be promped to enter mysql credentials for each database you export unless you have a .my.cnf file in place. See README.md file for more information.\e[0m\n"
23
-
printf"sudo $0$*"
24
-
exit 1
22
+
printf"\e[1m%s\e[0m\n""This script needs sudo privileges. You will also be prompted to enter MySQL credentials for each database you export unless you have a .my.cnf file in place. See README.md file for more information."
23
+
printf"%s\n""sudo $0$*"
24
+
exit 1
25
25
fi
26
26
27
27
printf"%b""\e[1mChecking for required package: pv\e[0m\n"
28
28
sleep 1
29
29
30
30
FILE=/usr/bin/pv
31
31
if [ -f"$FILE" ];then
32
-
printf"%b""\e[1m$FILE exists.\e[0m\n"
33
-
else
34
-
printf"%b""\e[31m$FILE does not exist. You may install it with "sudo apt install pv" or your distros package manager. - Script will now exit.\e[0m\n"&&exit 0
32
+
printf"%b""\e[1m$FILE exists.\e[0m\n"
33
+
else
34
+
printf"%b""\e[31m$FILE does not exist. You may install it with "sudo apt install pv" or your distros package manager. - Script will now exit.\e[0m\n"&&exit 0
35
35
fi
36
36
37
37
printf"%b""\e[1mChecking for required package: gzip\e[0m\n"
38
38
sleep 1
39
39
40
40
FILE1=/bin/gzip
41
41
if [ -f"$FILE1" ];then
42
-
printf"%b""\e[1m$FILE1 exists.\e[0m\n"
43
-
else
44
-
printf"%b""\e[31m$FILE1 does not exist. You may install it with "sudo apt install gzip" or your distros package manager. - Script will now exit.\e[0m\n"&&exit 0
42
+
printf"%b""\e[1m$FILE1 exists.\e[0m\n"
43
+
else
44
+
printf"%b""\e[31m$FILE1 does not exist. You may install it with "sudo apt install gzip" or your distros package manager. - Script will now exit.\e[0m\n"&&exit 0
45
45
fi
46
46
47
47
printf"%b""\e[1mBacking up to: $backuplocation\e[0m\n"
@@ -51,27 +51,29 @@ mkdir -p $backuplocation
51
51
52
52
printf"%b""\e[1mDumping Databases... Your mysql root password is required\e[0m\n"
0 commit comments