Skip to content

Commit 1990464

Browse files
committed
feat: add 'sync' in 'Create backup (via Rsync)'
1 parent 241f295 commit 1990464

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Security and Recovery/Create backup (via Rsync)

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ _main() {
2020

2121
# Execute the function '_main_task' for each file in parallel.
2222
_run_task_parallel "$input_files" "$output_dir"
23+
# Execute a flush to guarantee data is physically written,
24+
# especially important for USB media.
25+
sync
2326
_display_result_box "$output_dir"
2427
}
2528

@@ -48,11 +51,11 @@ _main_task() {
4851
# Perform incremental backup with rsync.
4952
if [[ -n "$old_version_dir" && -d "$old_version_dir" ]]; then
5053
# If a previous backup exists, use it as incremental reference.
51-
std_output=$(rsync --archive --progress --hard-links --delete \
54+
std_output=$(rsync --archive --quiet --hard-links --delete \
5255
--link-dest="$old_version_dir" \
5356
-- "$input_file" "$version_dir" 2>&1)
5457
else
55-
std_output=$(rsync --archive --progress --hard-links --delete \
58+
std_output=$(rsync --archive --quiet --hard-links --delete \
5659
-- "$input_file" "$version_dir" 2>&1)
5760
fi
5861

0 commit comments

Comments
 (0)