From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CJPZHEWQametqwAAqHPOHw:P1 (envelope-from ) for ; Tue, 24 Dec 2024 10:43:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id CJPZHEWQametqwAAqHPOHw (envelope-from ) for ; Tue, 24 Dec 2024 11:43:17 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Av3GcNGm; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GhlDPQCi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735036996; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=55p6zUpTXy0yyvL3ZLv7MqnbwCIJL6VEk3fWg7KSDTA=; b=tqB8fFTXZWpJ5c9v/t251Jxu8gOTsTo1VXbkIkEoSMefii18SFPdby5GQ4MdN/Crw7kRgX Sj5xiZxoF3WL1LQL9lc2Mbt23qsJtfPT8N4QYl1GWih3O0/RZ+oKfPe9FCSRqvp7Nwxyi/ kqS2bySGcnktrXkbgU6lTxd/zpeHF+Y1c+P+5XI1GMmZN1xZPttkF8o8XmenQZAdWbN8O2 m15RrUI5b0Sy3GvsW9qlywbpGwZzQkQ82Vex/3qIbd8ewRnHJuTQ/rmojl19hacFOkPclB 1fgHwzM8cX6bj8r08xSaASQ2t9cSdWenzej0LyM78g9fUDf9Z1IgexAksPr1kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Av3GcNGm; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=GhlDPQCi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735036996; a=rsa-sha256; cv=none; b=e7Y3mQYWPPK29LGKMbZurQCzmG8UDXO0PrDsRvglFdZGdPbRPmMI9IHQaSP1n0Mh3PSW3O eDBMOZInfWgKTkNWm6Rlv0dHuWfZK00AbPlfjJCrL1KlkzWnvKF/d8afXO3mLvPLezps03 tUD9+iNeQ1aOfvs1sLlTlAdR6xRXKI6Df5VwMS8FdUhb1tKo7WzILCiNRrYEhSEZMwgawV tZZl18FXVXyMjF9iAyqmk+o4EB1YnVhe1kVPuTNsweLaCGb8q7vuhIwxVYzw3i7b+x7Tk2 RPGwtPffrZVt0xGoi7RHWEq42hx2WARwo6vSAuC95PV2dlMH03CwlopBB0yeFQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6EE02234AA for ; Tue, 24 Dec 2024 11:43:16 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ2NU-0003oO-3i; Tue, 24 Dec 2024 05:43:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ2NS-0003o1-Ih for guix-patches@gnu.org; Tue, 24 Dec 2024 05:43:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ2NS-0000Xj-8y for guix-patches@gnu.org; Tue, 24 Dec 2024 05:43:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=55p6zUpTXy0yyvL3ZLv7MqnbwCIJL6VEk3fWg7KSDTA=; b=Av3GcNGmsDnWTXD9qcCmXvpFabi6Efc6g9TlQnI4u/TOGjkXhcWzJO6DHi/gfnKQ1vu38a07wQTlsAuzQ92NuOd1BRjxOTxpwXf+MPAKSyamXSPsT15SVvQ6yTQnLCbRO8rapj1/n6SAYSq+Es0Cn8YA1usIN2HYaRu57k1Nlga6XWOK+4qShFxA20SYtpM8y9G336VUzLvbwEyZySn/UgTF/6PttMNiJXXyETcTkXmHiFWIzFYNauFuzmFwZHODONGqUxj7Tdd/5lKuAkSNb/LQbCCMQGnqBCuFeopzfEkhteKJaOCBZPePlL5z8JuE84c+pK3hViCpClxerj48zw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQ2NS-0000Ab-4S for guix-patches@gnu.org; Tue, 24 Dec 2024 05:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75045] [PATCH] services: restic-backup: Implement as a Shepherd timer. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Dec 2024 10:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75045 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Giacomo Leidi Cc: Maxim Cournoyer , 75045@debbugs.gnu.org Received: via spool by 75045-submit@debbugs.gnu.org id=B75045.1735036964620 (code B ref 75045); Tue, 24 Dec 2024 10:43:02 +0000 Received: (at 75045) by debbugs.gnu.org; 24 Dec 2024 10:42:44 +0000 Received: from localhost ([127.0.0.1]:59638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ2NA-00009w-1j for submit@debbugs.gnu.org; Tue, 24 Dec 2024 05:42:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ2N6-00009d-9M for 75045@debbugs.gnu.org; Tue, 24 Dec 2024 05:42:42 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ2Ks-0000S1-Sz; Tue, 24 Dec 2024 05:40:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=55p6zUpTXy0yyvL3ZLv7MqnbwCIJL6VEk3fWg7KSDTA=; b=GhlDPQCiI1VfedkZeXa7 Vi6m14cRRxXje2wt0bSRDphzI2x2jOr0qkkT1JrOUV58YXsrOpNo0ulDExkQEVelD9O92SXtCmF0A Vha3/K3XmCeBVDpsHh5pAlCbcJ+FqVdxPG5ENNRJWWJY4awm9LGjBX4u86VDRofrgPfhZqItqVVRm n6uk4nep9uOg/NNc6RdxQY7dgZtcwD17eeSEnWva+Yo7o8gTvsd+P7yoWRRI+WMDjtBLFWJ71HH7s ZPHzsBkB/ErMQWwq8aRugIFpGM/4YnTT7944gi3hEbI0om9diqZCid5lV6IaokSUL1uJ35tgFJSNs bjB+QAB0Wu997A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Giacomo Leidi's message of "Mon, 23 Dec 2024 11:46:05 +0100") References: Date: Tue, 24 Dec 2024 11:40:19 +0100 Message-ID: <87ikr95ppo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.71 X-Spam-Score: -3.71 X-Migadu-Queue-Id: 6EE02234AA X-TUID: qIvFAIbNQu9X Hi Giacomo, Giacomo Leidi skribis: > This patch implements restic backup with Shepherd services. It is > supposed not to break any existing setup. > > * gnu/services/backup.scm (restic-backup-job): Add Shepherd > configuration options; > (restic-backup-job->mcron-job): Replace with...; > (restic-job-log-file): New procedure; > (restic-backup-job->shepherd-service): New procedure; > (restic-backup-activation): New procedure; > (restic-backup-service-type): Replace mcron with Shepherd extension and a= dd > activation extension hook. > * doc/guix.texi: Document it. > > Change-Id: I66de3b6a1cb6177f9e4ee0c2acf3013ecbcdd338 Woo, nice! As mentioned in , I think we should postpone a little bit since these new features won=E2=80=99t work for peopl= e who haven=E2=80=99t rebooted into Shepherd 1.0, and they=E2=80=99ll get possibl= y confusing messages when reconfiguring. How we should postpone, I=E2=80=99m not sure. The conservative approach wo= uld be to wait until after the next Guix release, but that doesn=E2=80=99t sound reasonable=E2=80=A6 One month after the Shepherd upgrade, which would be Jan. 9th? It=E2=80=99s common for servers to have much longer uptimes thou= gh, plus there=E2=80=99s end-of-year vacation here. > + (log-file > + (maybe-string) > + "The file system path to the log file for this job. By default the f= ile will > +have the name of the job and be under @code{/var/log/restic-backup}.") Rather @file, with the =E2=80=9C.log=E2=80=9D suffix too, if I=E2=80=99m no= t mistaken. > + (max-duration > + (maybe-number) > + "The maximum duration in seconds that a job may last. Past > +@code{max-duration} seconds, the job will forcefully terminated.") s/will/is/ > + (shepherd-service (provision `(,(string->symbol > + (string-append name "-job")))) I would tend to not add the =E2=80=9C-job=E2=80=9D suffix, but that=E2=80= =99s a matter of taste! > + (command > + (list > + (string-append #+bash-minimal "/bin/bash") > + "-l" "-c" > + (string-append "restic-guix backup " #$name)) Why go through bash? Would it be possible to execute =E2=80=98restic-guix= =E2=80=99 directly? > (description > - "This service configures @code{mcron} jobs for running = backups > + "This service configures @code{Shepherd} timers for run= ning backups > with @code{restic}."))) You can drop @code here.