btrestic v0.2.0

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:

  • backup — Run backup for all configured subvolumes
  • restic [args...] — Run restic with configured environment
  • exec [args...] — Run arbitrary command with configured environment
  • upgrade — Check for updates and upgrade (use -a to auto-update without prompting, -f to force update)
  • version — Print the version

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

  • :snapshot_dir: Directory where temporary btrfs snapshots are created.
  • :subvolumes: List of btrfs subvolumes to back up.
  • :excludes: List of paths to exclude from the backup.
  • :env: Environment variables for restic (such as repository, credentials, password, etc).
  • :logging: Logging configuration:
    • logfile: Path to the log file.
    • loglevel: Log verbosity (debug, info, warn, error).

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

Repository

btrestic

Owner
Statistic
  • 0
  • 0
  • 4
  • 0
  • 2
  • about 12 hours ago
  • December 5, 2018
License

MIT License

Links
Synced at

Thu, 18 Dec 2025 22:10:42 GMT

Languages