File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
143143| 1.0.0.16 | 2025/01/24 | Improved some messages. |
144144| 1.0.0.17 | 2025/01/27 | Changed scripts to enable automatic backups scheduled on Linux (Crontab). |
145145| 1.0.0.18 | 2025/03/19 | Improved terminal messages |
146+ | 1.0.0.19 | 2025/04/22 | Improved terminal messages |
146147
147148---
148149
Original file line number Diff line number Diff line change 1212
1313source ${CONFIG_FILE}
1414
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 "
1717app_author=" Junon M."
1818
19- separator () {
20- echo " --------------------------------------------------------------------------------"
19+
20+ print_separator () {
21+ local len=${1:- 80}
22+ printf " %*s\n" $len " " | tr ' ' ' -'
2123}
2224
23- app_title () {
24- echo " $( separator) "
25+
26+ print_app_title () {
27+ print_separator
2528echo " LINUX RSYNC INCREMENTAL BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26- echo " $( separator ) "
29+ print_separator
2730}
2831
2932# Beep com alto-falante da placa mãe
@@ -37,7 +40,7 @@ sound_error="paplay ./Sounds/error.ogg"
3740# ${sound_finished}
3841
3942clear
40- echo " $( app_title ) "
43+ print_app_title
4144echo " "
4245
4346
6972 echo " ${TO_PATH[i]%/ } "
7073done
7174echo " "
72- echo " $( separator ) "
75+ print_separator
7376printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
7477sleep 7
7578printf " \n\n"
76- echo " $( separator ) "
79+ print_separator
7780
7881formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
7982
@@ -170,7 +173,7 @@ last_subfolder="${from_path##*/}"
170173 exit 1
171174 fi # end rsync
172175
173- echo " $( separator ) " | tee -a " ${log_file_details} "
176+ print_separator | tee -a " ${log_file_details} "
174177
175178 else # else - Impossível criar caminho
176179 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 1212
1313source ${CONFIG_FILE}
1414
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 "
1717app_author=" Junon M."
1818
19- separator () {
20- echo " --------------------------------------------------------------------------------"
19+
20+ print_separator () {
21+ local len=${1:- 80}
22+ printf " %*s\n" $len " " | tr ' ' ' -'
2123}
2224
23- app_title () {
24- echo " $( separator ) "
25+ print_app_title () {
26+ print_separator
2527echo " LINUX RSYNC BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26- echo " $( separator ) "
28+ print_separator
2729}
2830
2931# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
3739# ${sound_finished}
3840
3941clear
40- echo " $( app_title ) "
42+ print_app_title
4143echo " "
4244echo " START BACKUP FROM"
4345for i in ${! FROM_PATH[@]}
5456 echo " ${TO_PATH[i]%/ } "
5557done
5658echo " "
57- echo " $( separator ) "
59+ print_separator
5860printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
5961sleep 7
6062printf " \n\n"
61- echo " $( separator ) "
63+ print_separator
6264
6365# Data e Hora atual
6466formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
@@ -123,7 +125,7 @@ last_subfolder="${from_path##*/}"
123125
124126 fi
125127
126- echo " $( separator ) " | tee -a " ${log_file_details} "
128+ print_separator | tee -a " ${log_file_details} "
127129
128130 else # Impossível criar o caminho
129131 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 1212
1313source ${CONFIG_FILE}
1414
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 "
1717app_author=" Junon M."
1818
19- separator () {
20- echo " --------------------------------------------------------------------------------"
19+
20+ print_separator () {
21+ local len=${1:- 80}
22+ printf " %*s\n" $len " " | tr ' ' ' -'
2123}
2224
23- app_title () {
24- echo " $( separator ) "
25+ print_app_title () {
26+ print_separator
2527echo " LINUX RSYNC BACKUP RESTORE ${app_version} - ${app_date} - by ${app_author} "
26- echo " $( separator ) "
28+ print_separator
2729}
2830
2931# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
3739# ${sound_finished}
3840
3941clear
40- echo " $( app_title ) "
42+ print_app_title
4143echo " "
4244echo " WHERE DO YOU WANT TO RESTORE FROM?"
4345echo " "
@@ -74,7 +76,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
7476fi
7577
7678clear
77- echo " $( app_title ) "
79+ print_app_title
7880
7981# Copia removendo qualquer barra do final
8082arr_disk[0]=" ${TO_PATH[${index}]%/ } "
9294echo " "
9395echo " Press [ENTER] to restore now, or [CTRL+C] to exit..."
9496read
95- echo " $( separator ) "
97+ print_separator
9698echo " "
9799
98100# Data e Hora atual
@@ -156,7 +158,7 @@ last_subfolder="${from_path##*/}"
156158 ${sound_error}
157159 fi # end - rsync
158160
159- echo " $( separator ) " | tee -a " ${log_file} " " ${log_file_details} "
161+ print_separator | tee -a " ${log_file} " " ${log_file_details} "
160162
161163 fi # end - Verifica se o diretório existe
162164
Original file line number Diff line number Diff line change 1212
1313source ${CONFIG_FILE}
1414
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 "
1717app_author=" Junon M."
1818
19- separator () {
20- echo " --------------------------------------------------------------------------------"
19+
20+ print_separator () {
21+ local len=${1:- 80}
22+ printf " %*s\n" $len " " | tr ' ' ' -'
2123}
2224
23- app_title () {
24- echo " $( separator ) "
25+ print_app_title () {
26+ print_separator
2527echo " LINUX TAR INCREMENTAL BACKUP COPY ${app_version} - ${app_date} - by ${app_author} "
26- echo " $( separator ) "
28+ print_separator
2729}
2830
2931# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
3739# ${sound_finished}
3840
3941clear
40- echo " $( app_title ) "
42+ print_app_title
4143echo " "
4244
4345<< comment
7072 echo " ${TO_PATH[i]%/ } "
7173done
7274echo " "
73- echo " $( separator ) "
75+ print_separator
7476printf " \nStarting in 7 second(s), or press [CTRL+C] to exit..."
7577sleep 7
7678printf " \n\n"
77- echo " $( separator ) "
79+ print_separator
7880
7981# formato do arquivo
8082formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
@@ -155,7 +157,7 @@ last_subfolder="${from_path##*/}"
155157 exit 1
156158 fi # end - tar
157159
158- echo " $( separator ) " | tee -a " ${log_file_details} "
160+ print_separator | tee -a " ${log_file_details} "
159161
160162 else # Impossível criar o caminho
161163 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 1212
1313source ${CONFIG_FILE}
1414
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 "
1717app_author=" Junon M."
1818
19- separator () {
20- echo " --------------------------------------------------------------------------------"
19+
20+ print_separator () {
21+ local len=${1:- 80}
22+ printf " %*s\n" $len " " | tr ' ' ' -'
2123}
2224
23- app_title () {
24- echo " $( separator ) "
25+ print_app_title () {
26+ print_separator
2527echo " LINUX TAR INCREMENTAL BACKUP RESTORE ${app_version} - ${app_date} - by ${app_author} "
26- echo " $( separator ) "
28+ print_separator
2729}
2830
2931# Beep com alto-falante da placa mãe
@@ -37,7 +39,7 @@ sound_error="paplay ./Sounds/error.ogg"
3739# ${sound_finished}
3840
3941clear
40- echo " $( app_title ) "
42+ print_app_title
4143echo " "
4244echo " WHERE DO YOU WANT TO RESTORE FROM?"
4345echo " "
@@ -72,7 +74,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
7274fi
7375
7476clear
75- echo " $( app_title ) "
77+ print_app_title
7678
7779# Copia removendo qualquer barra do final
7880arr_disk[0]=" ${TO_PATH[${index}]%/ } "
9092echo " "
9193echo " Press [ENTER] to restore now, or [CTRL+C] to exit..."
9294read
93- echo " $( separator ) "
95+ print_separator
9496echo " "
9597
9698# Data e Hora atual
@@ -158,7 +160,7 @@ last_subfolder="${from_path##*/}"
158160 formated_date=$( date +%Y-%m-%d-[%H-%M-%S]-%A)
159161 printf " \nRESTORE SUCCESS '${formated_date} '\nFROM '${to_path} '\nTO '${from_path} '\n\n" | tee -a " ${log_file} " " ${log_file_details} "
160162
161- echo " $( separator ) " | tee -a " ${log_file} " " ${log_file_details} "
163+ print_separator | tee -a " ${log_file} " " ${log_file_details} "
162164
163165 else
164166 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.
You can’t perform that action at this time.
0 commit comments