diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-11 23:02:27 -0800 |
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2026-02-11 23:02:27 -0800 |
| commit | f6ed8e53eed9524ae9407974f0bc8274864d9135 (patch) | |
| tree | c823818a3de4f4514a156dded23b4f2891c24a87 /backomp | |
| parent | 199dafe4e43df892ef5ce73e6fc586b5af1d7e47 (diff) | |
| download | backomp-f6ed8e53eed9524ae9407974f0bc8274864d9135.tar.gz backomp-f6ed8e53eed9524ae9407974f0bc8274864d9135.tar.xz | |
less verbose output
Diffstat (limited to 'backomp')
| -rwxr-xr-x | backomp | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -122,16 +122,16 @@ current() { backup() { local dest_dir="${1}" src_path="${2}" local retain="${3}" interval="${4}" week_start="${5}" - local dest_path snaps keep i ki + local dest_path snaps keep skip i ki mapfile -td $'\0' snaps < <(shopt -s nullglob; printf '%s\0' "${dest_dir}/"* | awk -v 'RS=\0' -v 'ORS=\0' \ -- "${AWK_PREFILTER}") [[ -n "${snaps}" ]] && current "${snaps[0]##*/}" "${interval}" && \ - return - - ((dcount++ > 0)) && echo - echo "[${dcount}] [${retain}] ${src_path} => ${dest_dir}" + skip=1 + printf '[%d] [%s] %s => %s%s\n' "$((++dcount))" "${retain}" \ + "${src_path}" "${dest_dir}" "${skip:+ [SKIPPED]}" + [[ -n "${skip}" ]] && return dest_path="${dest_dir}/$(date -u '+%Y-%m-%d-%H%M%S')" run rsync -ac --mkpath ${snaps[0]:+"--link-dest=${snaps[0]}"} \ @@ -158,8 +158,6 @@ backup() { run rm -r "${snaps[i]}" fi done - - printf 'kept %s\n' "${keep[@]}" } declare -A def_opts=( |
