Correct dir for backups

This commit is contained in:
Micke Nordin 2023-03-13 16:27:32 +01:00
parent 3fb6164501
commit 18578817f1
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -15,7 +15,7 @@ echo "Cleaning up old backups for ${backup}"
ssh ${backup} "sudo /home/script/bin/purge_backups.sh ${remote_backup_dir}" ssh ${backup} "sudo /home/script/bin/purge_backups.sh ${remote_backup_dir}"
echo "Copying backups here" echo "Copying backups here"
mkdir -p ${backup_dir} mkdir -p ${backup_dir}
scp "script@${backup}:${remote_backup_dir}/$(date +%Y/%m/%d)/*.gz" "${backup_dir}" scp "script@${backup}:${remote_backup_dir}/mariadb-dump*.sql.gz" "${backup_dir}"
echo "Copying backups to remote bucket" echo "Copying backups to remote bucket"
rclone mkdir "${mirror}:${bucket}" rclone mkdir "${mirror}:${bucket}"
duplicity --full-if-older-than 1M --tempdir /mnt --archive-dir /mnt --no-encryption "${backup_dir}" "rclone://${mirror}:/${bucket}" duplicity --full-if-older-than 1M --tempdir /mnt --archive-dir /mnt --no-encryption "${backup_dir}" "rclone://${mirror}:/${bucket}"