diff --git a/defaults/main.yml b/defaults/main.yml index 555b86c..8084958 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,8 +6,8 @@ duplicity_archive_dir: '/duplicity' duplicity_gpg_real_name: 'duplicity' duplicity_gpg_email: 'team-lca@alterway.fr' -duplicity_cron_backup_minute: '0' -duplicity_cron_backup_hour: '3' +duplicity_cron_backup_minute: 0 +duplicity_cron_backup_hour: 3 duplicity_cron_backup_day: '*' duplicity_cron_backup_month: '*' duplicity_cron_backup_weekday: '*' @@ -34,7 +34,6 @@ duplicity_list: - /var/lib/solr - /var/lib/elasticsearch - /var/spool/postfix - - /var/www - /VMs - /.journal - /.fsck diff --git a/tasks/duplicity.yml b/tasks/duplicity.yml index 9902725..33455d4 100644 --- a/tasks/duplicity.yml +++ b/tasks/duplicity.yml @@ -214,7 +214,7 @@ month: "{{ duplicity_cron_backup_month }}" weekday: "{{ duplicity_cron_backup_weekday }}" user: "{{ duplicity_cron_backup_user }}" - job: "source /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --s3-use-new-style -v 4 --archive-dir={{ duplicity_archive_dir }} --full-if-older-than {{ duplicity_full_older_than }}D / \"{{ duplicity_s3_path }}\" --exclude-filelist {{ duplicity_exclude_filelist }}" + job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --s3-use-new-style -v 4 --archive-dir={{ duplicity_archive_dir }} --full-if-older-than {{ duplicity_full_older_than }}D / \"{{ duplicity_s3_path }}\" --exclude-filelist {{ duplicity_exclude_filelist }}" when: - duplicity_gpg_key is defined tags: ['backup_duplicity'] @@ -222,13 +222,13 @@ - name: duplicity | create cleanup cronjob cron: name: duplicity cleanup - minute: "{{ duplicity_cron_backup_minute }}" - hour: "{{ duplicity_cron_backup_hour }}" + minute: "{{ duplicity_cron_backup_minute+30 }}" + hour: "{{ duplicity_cron_backup_hour+3 }}" day: "{{ duplicity_cron_backup_day }}" month: "{{ duplicity_cron_backup_month }}" weekday: "{{ duplicity_cron_backup_weekday }}" user: "{{ duplicity_cron_backup_user }}" - job: "source /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --force --s3-use-new-style -v 4 remove-older-than {{ duplicity_remove_older_than }}D \"{{ duplicity_s3_path }}\"" + job: ". /etc/duplicity/duplicity.cnf && duplicity --encrypt-key {{ duplicity_gpg_key }} --force --s3-use-new-style -v 4 remove-older-than {{ duplicity_remove_older_than }}D \"{{ duplicity_s3_path }}\"" when: - duplicity_gpg_key is defined tags: ['backup_duplicity']