File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
nixos/modules/services/backup Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 33 "binfmt.d(5)" : " https://www.freedesktop.org/software/systemd/man/binfmt.d.html" ,
44 "bootctl(1)" : " https://www.freedesktop.org/software/systemd/man/bootctl.html" ,
55 "bootup(7)" : " https://www.freedesktop.org/software/systemd/man/bootup.html" ,
6+ "btrbk(1)" : " https://digint.ch/btrbk/doc/btrbk.1.html" ,
67 "busctl(1)" : " https://www.freedesktop.org/software/systemd/man/busctl.html" ,
78 "cat(1)" : " https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html" ,
89 "coredump.conf(5)" : " https://www.freedesktop.org/software/systemd/man/coredump.conf.html" ,
Original file line number Diff line number Diff line change 185185 Setting it to null disables the timer, thus this instance can only be started manually.
186186 '' ;
187187 } ;
188+ snapshotOnly = mkOption {
189+ type = types . bool ;
190+ default = false ;
191+ description = ''
192+ Whether to run in snapshot only mode. This skips backup creation and deletion steps.
193+ Useful when you want to manually backup to an external drive that might not always be connected.
194+ Use `btrbk -c /path/to/conf resume` to trigger manual backups.
195+ More examples [here](https://github.com/digint/btrbk#example-backups-to-usb-disk).
196+ See also `snapshot` subcommand in {manpage}`btrbk(1)`.
197+ '' ;
198+ } ;
188199 settings = mkOption {
189200 type = types . submodule {
190201 freeformType =
353364 User = "btrbk" ;
354365 Group = "btrbk" ;
355366 Type = "oneshot" ;
356- ExecStart = "${ pkgs . btrbk } /bin/btrbk -c /etc/btrbk/${ name } .conf run" ;
367+ ExecStart = "${ pkgs . btrbk } /bin/btrbk -c /etc/btrbk/${ name } .conf ${
368+ if instance . snapshotOnly then "snapshot" else "run"
369+ } " ;
357370 Nice = cfg . niceness ;
358371 IOSchedulingClass = cfg . ioSchedulingClass ;
359372 StateDirectory = "btrbk" ;
You can’t perform that action at this time.
0 commit comments