Skip to content

MEschenbacher/borgbackup-formula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

What this formula does

This formula will install the borgbackup package (assuming it is already available on your machine's sources). The clients will periodically (via cron) run a borgbackup.sh which pushes backups to a master. Borg supports backups on local filesystems and remote hosts via ssh. This formula requires ssh keys to be used when connecting to a remote host via ssh.

With the default configuration borg will backup every night, except on sundays where a backup plus a borg check of the last 7 snapshots will be done.

Requirements

  • cron
  • cronic (will be installed automatically)

Installation

See the full Salt Formulas installation and usage instructions.

Configuration

Carefully read through the default list of included and excluded backup dirs under borg/defaults.yaml.

Configuration is done via pillar. See example.pillar for examples.

States

  • borg.backup Installs borgbackup, sets up borgbackup.sh and borgwrapper.sh. Important: Run /root/borgbackup.sh once manually because ssh needs to verify the host and asks you to accept the hostkey.
  • borg.master Installs borgbackup, sets up repositories and sets up authorized_keys