backup-all-buckets: Add comment about safeguard

This commit is contained in:
Magnus Andersson 2023-10-12 09:21:57 +02:00
parent 5df8dba25c
commit 059bd041e6
Signed by untrusted user: mandersson
GPG key ID: 19CB2C58E1F19B16

View file

@ -37,7 +37,7 @@ function do_backup {
local mirrorbucket="${bucket}-mirror" local mirrorbucket="${bucket}-mirror"
local mountpoint="/opt/backupmounts/${bucket}" local mountpoint="/opt/backupmounts/${bucket}"
ps aux | grep duplicity | grep "[^a-zA-Z]${bucket}" > /dev/null ps aux | grep duplicity | grep "[^a-zA-Z]${bucket}" > /dev/null
local oktorun=$? local oktorun=$? # 1 == this bucket has no other bakup process in progress
mkdir -p ${mountpoint} mkdir -p ${mountpoint}
[ ${oktorun} -ne 0 ] && rclone mount ${project}:${bucket} ${mountpoint}/ --daemon --allow-other --dir-cache-time 24h [ ${oktorun} -ne 0 ] && rclone mount ${project}:${bucket} ${mountpoint}/ --daemon --allow-other --dir-cache-time 24h
rclone mkdir ${mirror}:${mirrorbucket} rclone mkdir ${mirror}:${mirrorbucket}