Compare commits
2 commits
42831948e1
...
7f7d38c87e
Author | SHA1 | Date | |
---|---|---|---|
Micke Nordin | 7f7d38c87e | ||
Micke Nordin | bac25d27c8 |
|
@ -50,7 +50,7 @@ function do_backup {
|
||||||
rclone mount ${project}:${bucket} ${mountpoint}/ --daemon --allow-other --dir-cache-time 24h
|
rclone mount ${project}:${bucket} ${mountpoint}/ --daemon --allow-other --dir-cache-time 24h
|
||||||
rclone mkdir ${mirror}:${mirrorbucket}
|
rclone mkdir ${mirror}:${mirrorbucket}
|
||||||
duplicity --full-if-older-than 1M --asynchronous-upload --tempdir /mnt --archive-dir /mnt --no-encryption ${mountpoint} rclone://${mirror}:/${mirrorbucket}
|
duplicity --full-if-older-than 1M --asynchronous-upload --tempdir /mnt --archive-dir /mnt --no-encryption ${mountpoint} rclone://${mirror}:/${mirrorbucket}
|
||||||
if [[ "${extra_backup_jobs[${customer}]:+none}" != "none" ]] && [[ -f "${extra_backup_jobs[${customer}]}" ]]; then
|
if [[ "${extra_backup_jobs[${customer}]:+found}" == "found" ]] && [[ -f "${extra_backup_jobs[${customer}]}" ]]; then
|
||||||
${extra_backup_jobs[${customer}]}
|
${extra_backup_jobs[${customer}]}
|
||||||
fi
|
fi
|
||||||
umount ${mountpoint}
|
umount ${mountpoint}
|
||||||
|
|
|
@ -25,7 +25,7 @@ dirty=0
|
||||||
primary=''
|
primary=''
|
||||||
declare -a users=( 'admin' )
|
declare -a users=( 'admin' )
|
||||||
cd "${tempdir}" || echo "Could not cd to tempdir"
|
cd "${tempdir}" || echo "Could not cd to tempdir"
|
||||||
declare -a projects=( "${yq}" -r '.project_mapping.'"${customer}"'.'"${environment}"'.assigned | "\(.[].project)"' /etc/hiera/data/common.yaml )
|
declare -a projects=( $("${yq}" -r '.project_mapping.'"${customer}"'.'"${environment}"'.assigned | "\(.[].project)"' /etc/hiera/data/common.yaml) )
|
||||||
if [[ "${include_userbuckets}" == "true" ]]; then
|
if [[ "${include_userbuckets}" == "true" ]]; then
|
||||||
primary=$("${yq}" -r '.project_mapping.'"${customer}"'.'"${environment}"'.primary_project' /etc/hiera/data/common.yaml)
|
primary=$("${yq}" -r '.project_mapping.'"${customer}"'.'"${environment}"'.primary_project' /etc/hiera/data/common.yaml)
|
||||||
projects+=( "${primary}" )
|
projects+=( "${primary}" )
|
||||||
|
|
Loading…
Reference in a new issue