#!/bin/bash # # Initialize borg repository # # This script was generated from a template by ansible. # # Sourcing the backup-passphrase . /root/backup/.borg_passphrase {% for b in borgbackup_servers %} REPOSITORY=ssh://{{ b.user }}@{{ b.fqdn }}:{{ b.port }}/./{{ b.home }}{{ b.pool }}/{{ inventory_hostname_short }} echo "Initializing borg repo $REPOSITORY..." /usr/bin/borg init -v --encryption={{ borgbackup_encryption_mode }} --storage-quota={{ b.quota }} --make-parent-dirs {{ b.options }} $REPOSITORY {% endfor %}