# Scripts for client to backup the database
# Theese scripts will be called by BackupPC DumpPreUserCmd and DumpPostUserCmd
# defined in roles/quadrant_backup_pc/templates/client.j2

- name: create dir
  become: yes
  file:
    path: /opt/perfact/custom
    state: directory
    mode: '0755'

- name: copy database-backup-script
  become: yes
  copy:
    src: backuppc-pg_basebackup.sh
    dest: /opt/perfact/custom/backuppc-pg_basebackup.sh
    mode: '0755'

- name: copy database-backup-remove-script
  become: yes
  copy:
    src: backuppc-pg_basebackup-remove.sh
    dest: /opt/perfact/custom/backuppc-pg_basebackup-remove.sh
    mode: '0755'

