Configuration profiles manager and scheduler for restic backup
  • Go 97.1%
  • Shell 1.1%
  • Makefile 0.9%
  • Roff 0.9%
Find a file
Fred 4d2a7b55df
code modernisation (#611)
* chore: run go fix

* cleanup after go fix

* no longer needed

* refactoring

* unused code
2026-03-27 18:17:19 +00:00
.github chore: upgrade to go 1.26 (#610) 2026-03-26 23:21:57 +00:00
.vscode Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
batt Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
build add logrotate to docker image #440 2025-02-03 19:01:23 +00:00
calendar code modernisation (#611) 2026-03-27 18:17:19 +00:00
config code modernisation (#611) 2026-03-27 18:17:19 +00:00
constants Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
contrib Add missing run-* and send-* to all command sections (#504) 2025-05-18 22:07:15 +01:00
crond code modernisation (#611) 2026-03-27 18:17:19 +00:00
darwin code modernisation (#611) 2026-03-27 18:17:19 +00:00
dial fix regression with temporary log file (#386) 2024-07-08 22:01:12 +01:00
docs Feature/589 windows start when available (#590) 2026-03-26 21:04:24 +00:00
examples fix(schedule): generate crontab files without user field (#556) 2025-08-28 22:47:42 +01:00
filesearch Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
lock chore: upgrade Go version to 1.25 across workflows and update related configurations (#564) 2025-09-27 17:18:00 +01:00
mask chore: upgrade Go version to 1.25 across workflows and update related configurations (#564) 2025-09-27 17:18:00 +01:00
monitor code modernisation (#611) 2026-03-27 18:17:19 +00:00
platform crond: add support for crontab file only (on any OS) (#289) 2024-03-22 22:32:07 +01:00
preventsleep code modernisation (#611) 2026-03-27 18:17:19 +00:00
priority code modernisation (#611) 2026-03-27 18:17:19 +00:00
remote code modernisation (#611) 2026-03-27 18:17:19 +00:00
restic code modernisation (#611) 2026-03-27 18:17:19 +00:00
schedule code modernisation (#611) 2026-03-27 18:17:19 +00:00
schtasks chore: upgrade to go 1.26 (#610) 2026-03-26 23:21:57 +00:00
shell code modernisation (#611) 2026-03-27 18:17:19 +00:00
systemd Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
term code modernisation (#611) 2026-03-27 18:17:19 +00:00
user fix root home regression bug in 0.30.0 (#497) 2025-05-05 20:49:38 +01:00
util code modernisation (#611) 2026-03-27 18:17:19 +00:00
win Escape config file name in schedule parameters (#420) 2024-10-18 20:10:21 +01:00
.gitignore Schedule user logged in (#470) 2025-03-28 10:53:23 +00:00
.gitmodules Add documentation on github.io (#104) 2022-05-20 21:25:07 +01:00
.godownloader.yml Add pre-built binary targets to release pipeline (#324) 2024-02-20 18:16:09 +00:00
.golangci.yml chore: upgrade Go version to 1.25 across workflows and update related configurations (#564) 2025-09-27 17:18:00 +01:00
.goreleaser-docker-only.yml docs: mention container image also available on GCR 2025-03-30 22:40:42 +01:00
.goreleaser-snapshot.yml docs: mention container image also available on GCR 2025-03-30 22:40:42 +01:00
.goreleaser.yml Upload to Github Container Registry (#479) 2025-03-30 19:48:49 +01:00
.mockery.yml upgrade mockery to v3 (#561) 2025-09-26 14:54:36 +01:00
.nojekyll Add documentation on github.io (#104) 2022-05-20 21:25:07 +01:00
codecov.yml enhance Executable function to handle relative paths (#537) 2025-07-28 18:29:44 +01:00
command_error.go Allow to interrupt the wait for a lock (#249) 2023-10-17 20:57:58 +01:00
commands.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
commands_display.go chore: upgrade Go version to 1.25 across workflows and update related configurations (#564) 2025-09-27 17:18:00 +01:00
commands_display_test.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
commands_generate.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
commands_schedule.go optimize systemctl commands (#531) 2025-07-28 16:00:37 +01:00
commands_schedule_test.go optimize systemctl commands (#531) 2025-07-28 16:00:37 +01:00
commands_test.go feat(schedule): introduce run-level option (#546) 2025-08-28 16:14:04 +01:00
complete.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
complete_test.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
context.go refactoring of arguments generation (#387) 2024-08-07 21:12:52 +01:00
context_test.go Linters (#397) 2024-08-18 15:31:58 +01:00
deprecation.go Group schedule (#418) 2024-10-21 18:27:28 +01:00
errors.go Pass context to own commands and profile runner (#280) 2023-11-11 19:31:01 +00:00
flags.go chore: upgrade Go version to 1.25 across workflows and update related configurations (#564) 2025-09-27 17:18:00 +01:00
flags_test.go Linters (#397) 2024-08-18 15:31:58 +01:00
go.mod chore: upgrade to go 1.26 (#610) 2026-03-26 23:21:57 +00:00
go.sum chore: update GitHub Actions workflows and dependencies, remove SonarCloud integration (#608) 2026-03-26 21:30:24 +00:00
install.sh Add pre-built binary targets to release pipeline (#324) 2024-02-20 18:16:09 +00:00
integration_test.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
LICENSE GPLv3 license 2019-06-21 10:27:44 +01:00
lock.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
lock_test.go Linters (#397) 2024-08-18 15:31:58 +01:00
logger.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
logger_test.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
main.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
main_test.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
Makefile chore: upgrade to go 1.26 (#610) 2026-03-26 23:21:57 +00:00
network_volume.png fix environment for darwin 2020-07-28 23:14:31 +01:00
own_command_error.go Pass context to own commands and profile runner (#280) 2023-11-11 19:31:01 +00:00
own_command_error_test.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
own_commands.go Upgrade golangci lint to v2 (#562) 2025-09-27 14:47:56 +01:00
own_commands_test.go Pass context to own commands and profile runner (#280) 2023-11-11 19:31:01 +00:00
README.md chore: update GitHub Actions workflows and dependencies, remove SonarCloud integration (#608) 2026-03-26 21:30:24 +00:00
run_profile.go stop running other profiles in group after receiving interrupt signal (#539) 2025-07-28 19:15:37 +01:00
run_profile_test.go add base url on json schema (#408) 2024-10-02 21:33:28 +01:00
schedule_jobs.go fix(schedule): omit launchd log paths when schedule-log is configured (#600) 2026-03-26 21:43:12 +00:00
schedule_jobs_test.go Schedule user logged in (#470) 2025-03-28 10:53:23 +00:00
shell_command.go fix overflow integer conversion lint warning from gosec (#399) 2024-08-25 16:41:33 +01:00
sleep.go Allow to interrupt the wait for a lock (#249) 2023-10-17 20:57:58 +01:00
sleep_test.go fix creation of mock binaries during unit tests (#375) 2024-06-28 22:08:33 +01:00
stack.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
stack_test.go fix empty stack trace in some cases 2022-04-17 23:43:30 +01:00
syslog.go log: allow controlling command output redirection (#343) 2024-03-21 19:05:51 +01:00
syslog_windows.go syslog: local syslog and stdout redirection (#344) 2024-03-19 09:42:54 +01:00
systemd.go don't include systemd dependencies on macos & windows 2025-02-15 18:07:35 +00:00
systemd_others.go don't include systemd dependencies on macos & windows 2025-02-15 18:07:35 +00:00
update.go Linters (#397) 2024-08-18 15:31:58 +01:00
update_test.go Linters (#397) 2024-08-18 15:31:58 +01:00
wrapper.go code modernisation (#611) 2026-03-27 18:17:19 +00:00
wrapper_streamsource.go Linters (#397) 2024-08-18 15:31:58 +01:00
wrapper_test.go code modernisation (#611) 2026-03-27 18:17:19 +00:00

Build codecov

resticprofile

Configuration profiles manager for restic backup

resticprofile is the missing link between a configuration file and restic backup. Creating a configuration file for restic has been discussed before, but seems to be a very low priority right now.

With resticprofile:

  • You no longer need to remember command parameters and environment variables
  • You can create multiple profiles inside one configuration file
  • A profile can inherit all the options from another profile
  • You can run the forget command before or after a backup (in a section called retention)
  • You can check a repository before or after a backup
  • You can create groups of profiles that will run sequentially
  • You can run shell commands before or after running a profile: useful if you need to mount and unmount your backup disk for example
  • You can run a shell command if an error occurred (at any time)
  • You can send a backup stream via stdin
  • You can start restic at a lower or higher priority (Priority Class in Windows, nice in all unixes) and/or ionice (only available on Linux)
  • It can check that you have enough memory before starting a backup. (I've had some backups that literally killed a server with swap disabled)
  • You can generate cryptographically secure random keys to use as a restic key file
  • You can easily schedule backups, retentions and checks (works for systemd, crond, launchd and windows task scheduler)
  • You can generate a simple status file to send to some monitoring software and make sure your backups are running fine
  • You can use a template syntax in your configuration file
  • You can generate scheduled tasks using crond
  • Get backup statistics in your status file
  • Automatically clear up stale locks
  • Export a prometheus file after a backup, or send the report to a push gateway automatically
  • [new for v0.17.0] Run shell commands in the background when non fatal errors are detected from restic
  • [new for v0.18.0] Send messages to HTTP hooks before, after a successful or failed job (backup, forget, check, prune, copy)
  • [new for v0.18.0] Automatically initialize the secondary repository using copy-chunker-params flag
  • [new for v0.18.0] Send resticprofile logs to a syslog server
  • [new for v0.19.0] Preventing your system from idle sleeping
  • [new for v0.21.0] See the help from both restic and resticprofile via the help command or -h flag
  • [new for v0.24.0] Don't schedule a job when the system is running on battery
  • [new for v0.29.0] Scheduling a group of profiles is finally available (configuration v2 only)

The configuration file accepts various formats:

  • TOML : configuration file with extension .toml and .conf to keep compatibility with versions before 0.6.0
  • JSON : configuration file with extension .json
  • YAML : configuration file with extension .yaml
  • HCL: configuration file with extension .hcl

We recommend you start by reading the getting started section

Using resticprofile

The full documentation has been moved to creativeprojects.github.io

Survey

What are your most important features? Please fill in the survey