btrestic

btrestic is a wrapper for using restic on a btrfs filesystem. For all configured subvolumes it creates read-only snapshots, backs them up with restic, and removes the snapshots afterwards.

Usage

Show help:

btrestic --help

Available commands:

You can specify a config file with -c or --config_file:

btrestic backup -c /path/to/btrestic.conf

Configuration File

The configuration file is a YAML file that controls how btrestic operates. Below is an example configuration:

:snapshot_dir: /mnt/btrfs/restic-snapshots
:subvolumes:
	- /mnt/btrfs/@home
	- /mnt/btrfs/@music
	- /mnt/btrfs/@videos
	- /mnt/btrfs/@pictures
:excludes:
	- /mnt/btrfs/@home/my_user/.cache
:env:
	AWS_ACCESS_KEY_ID: aws-access-key-id```
	AWS_SECRET_ACCESS_KEY: super-secret-aws-key
	RESTIC_PASSWORD: super-secret-restic-password
	RESTIC_REPOSITORY: s3:s3.wasabisys.com/my-bucket
:logging:
	logfile: /var/log/btrestic.log
	loglevel: warn

Configuration Options

You can use the provided btrestic.conf.example as a template for your own configuration.

Contributing

  1. Fork it (https://gitlab.com/dilli/btrestic/forks/new)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors