diff --git a/playbooks/install_borgbackup.yml b/playbooks/install_borgbackup.yml index 49f1ff4..e0bb01b 100644 --- a/playbooks/install_borgbackup.yml +++ b/playbooks/install_borgbackup.yml @@ -4,6 +4,7 @@ vars: borg.repo.path: /var/backup/backup.borg/ borg.repo.encryption: none + borg.backup.paths: /etc/ /var/spool/ --exclude=*.log tasks: - name: "Install borg backup" apt: diff --git a/templates/borgbackup.j2 b/templates/borgbackup.j2 index 51c6b64..b07de01 100644 --- a/templates/borgbackup.j2 +++ b/templates/borgbackup.j2 @@ -2,12 +2,10 @@ # Borg repo location REPOSITORY={{borg.repo.path}} -# Example of remote repo -# REPOSITORY=ssh://backuper@192.168.1.100/{{borg.repo.path}} echo "`date +[%F/%T]` Starting the backup" # Create backup -borg create -v --compression lzma,6 --stats $REPOSITORY::$(date +%Y-%m-%d-%H:%M) /etc/ /var/spool/ --exclude=*.log +borg create -v --compression lzma,6 --stats $REPOSITORY::$(date +%Y-%m-%d-%H:%M) {{borg.backup.paths}} # Clean old backups borg prune -v $REPOSITORY --keep-daily=3 --keep-weekly=2 --keep-monthly=12 echo "`date +[%F/%T]` Done!"