Skip to content

Commit dcc5cf0

Browse files
committed
v1.0.0.19 2025/04/22
1 parent c058fbf commit dcc5cf0

12 files changed

+68
-87
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignored/

README.md

+1
Original file line numberDiff line numberDiff 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

rsync/Incremental/make_rsync_inc_backup.sh

+14-11
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@ fi
1212

1313
source ${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"
1717
app_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
2528
echo " 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

3942
clear
40-
echo "$(app_title)"
43+
print_app_title
4144
echo ""
4245

4346

@@ -69,11 +72,11 @@ do
6972
echo "${TO_PATH[i]%/}"
7073
done
7174
echo ""
72-
echo "$(separator)"
75+
print_separator
7376
printf "\nStarting in 7 second(s), or press [CTRL+C] to exit..."
7477
sleep 7
7578
printf "\n\n"
76-
echo "$(separator)"
79+
print_separator
7780

7881
formated_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"

rsync/Mirror/make_rsync_backup.sh

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ fi
1212

1313
source ${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"
1717
app_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
2527
echo " 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

3941
clear
40-
echo "$(app_title)"
42+
print_app_title
4143
echo ""
4244
echo "START BACKUP FROM"
4345
for i in ${!FROM_PATH[@]}
@@ -54,11 +56,11 @@ do
5456
echo "${TO_PATH[i]%/}"
5557
done
5658
echo ""
57-
echo "$(separator)"
59+
print_separator
5860
printf "\nStarting in 7 second(s), or press [CTRL+C] to exit..."
5961
sleep 7
6062
printf "\n\n"
61-
echo "$(separator)"
63+
print_separator
6264

6365
# Data e Hora atual
6466
formated_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"

rsync/Mirror/restore_rsync_backup.sh

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ fi
1212

1313
source ${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"
1717
app_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
2527
echo " 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

3941
clear
40-
echo "$(app_title)"
42+
print_app_title
4143
echo ""
4244
echo "WHERE DO YOU WANT TO RESTORE FROM?"
4345
echo ""
@@ -74,7 +76,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
7476
fi
7577

7678
clear
77-
echo "$(app_title)"
79+
print_app_title
7880

7981
# Copia removendo qualquer barra do final
8082
arr_disk[0]="${TO_PATH[${index}]%/}"
@@ -92,7 +94,7 @@ done
9294
echo ""
9395
echo "Press [ENTER] to restore now, or [CTRL+C] to exit..."
9496
read
95-
echo "$(separator)"
97+
print_separator
9698
echo ""
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

tar/make_tar_inc_backup.sh

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ fi
1212

1313
source ${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"
1717
app_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
2527
echo " 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

3941
clear
40-
echo "$(app_title)"
42+
print_app_title
4143
echo ""
4244

4345
<<comment
@@ -70,11 +72,11 @@ do
7072
echo "${TO_PATH[i]%/}"
7173
done
7274
echo ""
73-
echo "$(separator)"
75+
print_separator
7476
printf "\nStarting in 7 second(s), or press [CTRL+C] to exit..."
7577
sleep 7
7678
printf "\n\n"
77-
echo "$(separator)"
79+
print_separator
7880

7981
# formato do arquivo
8082
formated_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"

tar/restore_tar_inc_backup.sh

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ fi
1212

1313
source ${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"
1717
app_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
2527
echo " 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

3941
clear
40-
echo "$(app_title)"
42+
print_app_title
4143
echo ""
4244
echo "WHERE DO YOU WANT TO RESTORE FROM?"
4345
echo ""
@@ -72,7 +74,7 @@ if [ ! $index -le $[${#TO_PATH[@]}-1] ]; then
7274
fi
7375

7476
clear
75-
echo "$(app_title)"
77+
print_app_title
7678

7779
# Copia removendo qualquer barra do final
7880
arr_disk[0]="${TO_PATH[${index}]%/}"
@@ -90,7 +92,7 @@ done
9092
echo ""
9193
echo "Press [ENTER] to restore now, or [CTRL+C] to exit..."
9294
read
93-
echo "$(separator)"
95+
print_separator
9496
echo ""
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"

test/Add_from.sh

-3
This file was deleted.

test/Clean_To.sh

-11
This file was deleted.

test/Clean_from.sh

-3
This file was deleted.

test/backup_path.txt

-7
This file was deleted.

test/inc_backup_path.txt

-8
This file was deleted.

0 commit comments

Comments
 (0)