GNU bug report logs -
#76169
home: Add home-restic-backup service.
Previous Next
Reported by: paul <goodoldpaul <at> autistici.org>
Date: Mon, 10 Feb 2025 00:06:01 UTC
Severity: normal
Tags: moreinfo
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:
> +(define (restic-backup-job->home-shepherd-service config)
> + (let ((schedule (restic-backup-job-schedule config))
> + (name (restic-backup-job-name config))
> + (files (restic-backup-job-files config))
> + (max-duration (restic-backup-job-max-duration config))
> + (wait-for-termination? (restic-backup-job-wait-for-termination? config))
> + (log-file (home-restic-job-log-file config))
> + (requirement (restic-backup-job-requirement config)))
> + (shepherd-service (provision `(,(string->symbol name)))
> + (requirement
> + `(,@requirement))
> + (documentation
> + "Run @code{restic} backed backups on a regular basis.")
> + (modules '((shepherd service timer)
> + ;;for %user-log-dir
> + (shepherd support)))
> + (start
> + #~(make-timer-constructor
> + (if (string? #$schedule)
> + (cron-string->calendar-event #$schedule)
> + #$schedule)
Instead of duplicating the whole thing, I’d suggest using ‘for-home?’ as
is done for example with ‘home-dicod-service-type’. That way, we end up
with a single source that works for both system and home services.
Ludo’.
This bug report was last modified 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.