Browse Source

clear cloud backups before generating more

Blaine Story 10 months ago
parent
commit
fbad3f71c0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      roles/cloud-backups/templates/backup-to-b2.sh.j2

+ 2 - 0
roles/cloud-backups/templates/backup-to-b2.sh.j2

@@ -3,6 +3,8 @@
 
 
 LOG_FILE="/var/log/rclone/rclone-$(date +%Y-%m-%d).log"
 LOG_FILE="/var/log/rclone/rclone-$(date +%Y-%m-%d).log"
 
 
+rm -f /opt/backups/*
+
 {% if backups is defined and 'containers' in backups %}
 {% if backups is defined and 'containers' in backups %}
 {% if containers is defined %}
 {% if containers is defined %}
 {% for container in containers %}
 {% for container in containers %}