1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

avoid an error about the fact that the repo already exists (I assume that getting the config of a repo is fast, but maybe not?)

This commit is contained in:
Kay0u 2024-06-21 20:12:09 +02:00
parent 014972b810
commit d3f58d01d0
No known key found for this signature in database
GPG key ID: AE1DCADB6415A156

View file

@ -29,7 +29,8 @@ do_backup() {
size="$3"
description="$4"
set +e
if "$borg" init -e repokey "$repo" ; then
if ! "$borg" config -l > /dev/null 2>&1; then
"$borg" init -e repokey
# human_size=`echo $size | awk '{ suffix=" KMGT"; for(i=1; $1>1024 && i < length(suffix); i++) $1/=1024; print int($1) substr(suffix, i, 1), $3; }'`
# Speed in Kbps
# speed=1000