2023-02-13 09:44:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
project="${1}"
|
|
|
|
bucket="${2}"
|
|
|
|
data_dir='/opt/backups/data'
|
2023-02-23 15:07:01 +00:00
|
|
|
for project in $(rclone listremotes | grep -v 'mirror' | grep -v 'statistics'); do
|
2023-02-13 09:44:56 +00:00
|
|
|
for bucket in $(rclone lsd "${project}" | awk '{print $NF}' | grep -E '\-mirror|db-backups'); do
|
|
|
|
mkdir -p "${data_dir}/${project}"
|
|
|
|
duplicity collection-status --log-file /dev/stdout --no-encryption "rclone://${project}${bucket}" | grep -E '^ inc|^ full' > "${data_dir}/${project}/${bucket}.dat"
|
|
|
|
done
|
|
|
|
done
|