File tree 12 files changed +68
-87
lines changed
12 files changed +68
-87
lines changed Original file line number Diff line number Diff line change
1
+ ignored /
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ DAY_LIMIT=30 # Backup History = 30 days
143
143
| 1.0.0.16 | 2025/01/24 | Improved some messages. |
144
144
| 1.0.0.17 | 2025/01/27 | Changed scripts to enable automatic backups scheduled on Linux (Crontab). |
145
145
| 1.0.0.18 | 2025/03/19 | Improved terminal messages |
146
+ | 1.0.0.19 | 2025/04/22 | Improved terminal messages |
146
147
147
148
---
148
149
Original file line number Diff line number Diff line change 12
12
13
13
source ${CONFIG_FILE}
14
14
15
- app_version=" v1.0.0.18 "
16
- app_date=" 2025/03/19 "
15
+ app_version=" v1.0.0.19 "
16
+ app_date=" 2025/03/27 "
17
17
app_author=" Junon M."
18
18
19
- separator () {
20
- echo " --------------------------------------------------------------------------------"
19
+
20
+ print_separator () {
21
+ local len=${1:- 80}
22
+ printf " %*s\n" $len " " | tr ' ' ' -'
21
23
}
22
24
23
- app_title () {
24
- echo " $( separator) "
25
+
26
+ print_app_title () {
27
+ print_separator
25
28
echo " LINUX RSYNC INCREMENTAL BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26
- echo " $( separator ) "
29
+ print_separator
27
30
}
28
31
29
32
# Beep com alto-falante da placa mãe
@@ -37,7 +40,7 @@ sound_error="paplay ./Sounds/error.ogg"
37
40
# ${sound_finished}
38
41
39
42
clear
40
- echo " $( app_title ) "
43
+ print_app_title
41
44
echo " "
42
45
43
46
69
72
echo " ${TO_PATH[i]%/ } "
70
73
done
71
74
echo " "
72
- echo " $( separator ) "
75
+ print_separator
73
76
printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
74
77
sleep 7
75
78
printf " \n\n"
76
- echo " $( separator ) "
79
+ print_separator
77
80
78
81
formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
79
82
@@ -170,7 +173,7 @@ last_subfolder="${from_path##*/}"
170
173
exit 1
171
174
fi # end rsync
172
175
173
- echo " $( separator ) " | tee -a " ${log_file_details} "
176
+ print_separator | tee -a " ${log_file_details} "
174
177
175
178
else # else - Impossível criar caminho
176
179
printf " \nERROR: THE PATH '${TO_PATH[i]} ' DOES NOT EXISTS!\n\nIMPOSSIBLE TO CREATE!\n\n"
Original file line number Diff line number Diff line change 12
12
13
13
source ${CONFIG_FILE}
14
14
15
- app_version=" v1.0.0.18 "
16
- app_date=" 2025/03/19 "
15
+ app_version=" v1.0.0.19 "
16
+ app_date=" 2025/03/27 "
17
17
app_author=" Junon M."
18
18
19
- separator () {
20
- echo " --------------------------------------------------------------------------------"
19
+
20
+ print_separator () {
21
+ local len=${1:- 80}
22
+ printf " %*s\n" $len " " | tr ' ' ' -'
21
23
}
22
24
23
- app_title () {
24
- echo " $( separator ) "
25
+ print_app_title () {
26
+ print_separator
25
27
echo " LINUX RSYNC BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26
- echo " $( separator ) "
28
+ print_separator
27
29
}
28
30
29
31
# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
37
39
# ${sound_finished}
38
40
39
41
clear
40
- echo " $( app_title ) "
42
+ print_app_title
41
43
echo " "
42
44
echo " START BACKUP FROM"
43
45
for i in ${! FROM_PATH[@]}
54
56
echo " ${TO_PATH[i]%/ } "
55
57
done
56
58
echo " "
57
- echo " $( separator ) "
59
+ print_separator
58
60
printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
59
61
sleep 7
60
62
printf " \n\n"
61
- echo " $( separator ) "
63
+ print_separator
62
64
63
65
# Data e Hora atual
64
66
formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
@@ -123,7 +125,7 @@ last_subfolder="${from_path##*/}"
123
125
124
126
fi
125
127
126
- echo " $( separator ) " | tee -a " ${log_file_details} "
128
+ print_separator | tee -a " ${log_file_details} "
127
129
128
130
else # Impossível criar o caminho
129
131
printf " \nERROR: THE PATH '${TO_PATH[i]%/ } ' DOES NOT EXISTS!\n\nIMPOSSIBLE TO CREATE!\n\n"
Original file line number Diff line number Diff line change 12
12
13
13
source ${CONFIG_FILE}
14
14
15
- app_version=" v1.0.0.18 "
16
- app_date=" 2025/03/19 "
15
+ app_version=" v1.0.0.19 "
16
+ app_date=" 2025/03/27 "
17
17
app_author=" Junon M."
18
18
19
- separator () {
20
- echo " --------------------------------------------------------------------------------"
19
+
20
+ print_separator () {
21
+ local len=${1:- 80}
22
+ printf " %*s\n" $len " " | tr ' ' ' -'
21
23
}
22
24
23
- app_title () {
24
- echo " $( separator ) "
25
+ print_app_title () {
26
+ print_separator
25
27
echo " LINUX RSYNC BACKUP RESTORE ${app_version} - ${app_date} - by ${app_author} "
26
- echo " $( separator ) "
28
+ print_separator
27
29
}
28
30
29
31
# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
37
39
# ${sound_finished}
38
40
39
41
clear
40
- echo " $( app_title ) "
42
+ print_app_title
41
43
echo " "
42
44
echo " WHERE DO YOU WANT TO RESTORE FROM?"
43
45
echo " "
@@ -74,7 +76,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
74
76
fi
75
77
76
78
clear
77
- echo " $( app_title ) "
79
+ print_app_title
78
80
79
81
# Copia removendo qualquer barra do final
80
82
arr_disk[0]=" ${TO_PATH[${index}]%/ } "
92
94
echo " "
93
95
echo " Press [ENTER] to restore now, or [CTRL+C] to exit..."
94
96
read
95
- echo " $( separator ) "
97
+ print_separator
96
98
echo " "
97
99
98
100
# Data e Hora atual
@@ -156,7 +158,7 @@ last_subfolder="${from_path##*/}"
156
158
${sound_error}
157
159
fi # end - rsync
158
160
159
- echo " $( separator ) " | tee -a " ${log_file} " " ${log_file_details} "
161
+ print_separator | tee -a " ${log_file} " " ${log_file_details} "
160
162
161
163
fi # end - Verifica se o diretório existe
162
164
Original file line number Diff line number Diff line change 12
12
13
13
source ${CONFIG_FILE}
14
14
15
- app_version=" v1.0.0.18 "
16
- app_date=" 2025/03/19 "
15
+ app_version=" v1.0.0.19 "
16
+ app_date=" 2025/03/27 "
17
17
app_author=" Junon M."
18
18
19
- separator () {
20
- echo " --------------------------------------------------------------------------------"
19
+
20
+ print_separator () {
21
+ local len=${1:- 80}
22
+ printf " %*s\n" $len " " | tr ' ' ' -'
21
23
}
22
24
23
- app_title () {
24
- echo " $( separator ) "
25
+ print_app_title () {
26
+ print_separator
25
27
echo " LINUX TAR INCREMENTAL BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26
- echo " $( separator ) "
28
+ print_separator
27
29
}
28
30
29
31
# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
37
39
# ${sound_finished}
38
40
39
41
clear
40
- echo " $( app_title ) "
42
+ print_app_title
41
43
echo " "
42
44
43
45
<< comment
70
72
echo " ${TO_PATH[i]%/ } "
71
73
done
72
74
echo " "
73
- echo " $( separator ) "
75
+ print_separator
74
76
printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
75
77
sleep 7
76
78
printf " \n\n"
77
- echo " $( separator ) "
79
+ print_separator
78
80
79
81
# formato do arquivo
80
82
formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
@@ -155,7 +157,7 @@ last_subfolder="${from_path##*/}"
155
157
exit 1
156
158
fi # end - tar
157
159
158
- echo " $( separator ) " | tee -a " ${log_file_details} "
160
+ print_separator | tee -a " ${log_file_details} "
159
161
160
162
else # Impossível criar o caminho
161
163
printf " \nERROR: THE PATH '${TO_PATH[i]} ' DOES NOT EXISTS!\n\nIMPOSSIBLE TO CREATE!\n\n"
Original file line number Diff line number Diff line change 12
12
13
13
source ${CONFIG_FILE}
14
14
15
- app_version=" v1.0.0.18 "
16
- app_date=" 2025/03/19 "
15
+ app_version=" v1.0.0.19 "
16
+ app_date=" 2025/03/27 "
17
17
app_author=" Junon M."
18
18
19
- separator () {
20
- echo " --------------------------------------------------------------------------------"
19
+
20
+ print_separator () {
21
+ local len=${1:- 80}
22
+ printf " %*s\n" $len " " | tr ' ' ' -'
21
23
}
22
24
23
- app_title () {
24
- echo " $( separator ) "
25
+ print_app_title () {
26
+ print_separator
25
27
echo " LINUX TAR INCREMENTAL BACKUP RESTORE ${app_version} - ${app_date} - by ${app_author} "
26
- echo " $( separator ) "
28
+ print_separator
27
29
}
28
30
29
31
# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
37
39
# ${sound_finished}
38
40
39
41
clear
40
- echo " $( app_title ) "
42
+ print_app_title
41
43
echo " "
42
44
echo " WHERE DO YOU WANT TO RESTORE FROM?"
43
45
echo " "
@@ -72,7 +74,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
72
74
fi
73
75
74
76
clear
75
- echo " $( app_title ) "
77
+ print_app_title
76
78
77
79
# Copia removendo qualquer barra do final
78
80
arr_disk[0]=" ${TO_PATH[${index}]%/ } "
90
92
echo " "
91
93
echo " Press [ENTER] to restore now, or [CTRL+C] to exit..."
92
94
read
93
- echo " $( separator ) "
95
+ print_separator
94
96
echo " "
95
97
96
98
# Data e Hora atual
@@ -158,7 +160,7 @@ last_subfolder="${from_path##*/}"
158
160
formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
159
161
printf " \nRESTORE SUCCESS '${formated_date} '\nFROM '${to_path} '\nTO '${from_path} '\n\n" | tee -a " ${log_file} " " ${log_file_details} "
160
162
161
- echo " $( separator ) " | tee -a " ${log_file} " " ${log_file_details} "
163
+ print_separator | tee -a " ${log_file} " " ${log_file_details} "
162
164
163
165
else
164
166
printf " \nERROR: THE PATH '${arr_disk[i]} ' DOES NOT EXISTS!\n\n"
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments