From patchwork Sat May 25 13:23:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 64875 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4A5D927BBE9; Sat, 25 May 2024 14:25:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 56AD527BBE2 for ; Sat, 25 May 2024 14:25:54 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sArOX-0000PN-VS; Sat, 25 May 2024 09:25:09 -0400 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 1sArOK-0000Fz-2E for guix-patches@gnu.org; Sat, 25 May 2024 09:24:56 -0400 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 1sArOJ-0001QE-Qn for guix-patches@gnu.org; Sat, 25 May 2024 09:24:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sArOQ-0006T0-Vi for guix-patches@gnu.org; Sat, 25 May 2024 09:25:03 -0400 Subject: bug#69513: [PATCH v3] services: Add restic-backup service. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 25 May 2024 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 69513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Giacomo Leidi Cc: 69513-done@debbugs.gnu.org Mail-Followup-To: 69513@debbugs.gnu.org, ludo@gnu.org, goodoldpaul@autistici.org Received: via spool by 69513-done@debbugs.gnu.org id=D69513.171664346424723 (code D ref 69513); Sat, 25 May 2024 13:25:02 +0000 Received: (at 69513-done) by debbugs.gnu.org; 25 May 2024 13:24:24 +0000 Received: from localhost ([127.0.0.1]:43411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArNo-0006Qg-0e for submit@debbugs.gnu.org; Sat, 25 May 2024 09:24:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArNm-0006QM-7u for 69513-done@debbugs.gnu.org; Sat, 25 May 2024 09:24:23 -0400 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 1sArNU-0001HL-Tn; Sat, 25 May 2024 09:24:05 -0400 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=bmMUX9n/wtjGufS6DOt/vZIni4lKDrvWGHkMbYzPw5w=; b=WSqk3tavFG9qnaHu6W0R YOBiCrbDG/apz5k/qKzRmWE7pHLWxU9GCZTBbZsUxNrNcEKxr0Gye3p036A4v7fuzZ0hu2DqWrBBu YCG6X+0thdhE/7gfsbrlLuIvyLSvxlsTcFwNq66VnFPoM2vaBXD2pIFa+zM4NorUoehR3pu8B9v6l QZDX2RSpIHJZ/XUuxqnj3+xE5DZf2ql1M3BGhantPFXLFA+zmFw/oauu9pw4szGFLm1cWyp5TBhUc o0FG37CCCjv+Mr59kvpyRsymKdMTjQeZuCNWaNWs304jZc1S0YN5ndZN5ED2V2WYSvsaXySuAOZll FtPeO33i3D7cbQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <4d1b9e86fa4c0f70b30d45de5a29ec19b41c0e8f.1714598106.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Wed, 1 May 2024 23:15:07 +0200") References: <3afc07b0f3e6663a9fb64203544bce1659f97364.1709412684.git.goodoldpaul@autistici.org> <4d1b9e86fa4c0f70b30d45de5a29ec19b41c0e8f.1714598106.git.goodoldpaul@autistici.org> Date: Sat, 25 May 2024 15:23:57 +0200 Message-ID: <87r0dq10uq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, Giacomo Leidi skribis: > * gnu/services/backup.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi: Document this. > > Change-Id: I9efd5559bb445b484107a7c27c2d0a65ccad1e66 Please consider adding a system test for this: as previously discussed, we try hard to have tests for every system service. I’ve applied it with the minor doc changes below. There might be more work that could be done to ensure the doc is self-contained. For instance, I merely guessed that ‘rclone’ needed to be in the system profile so ‘restic’ would use it, and I cannot tell what those repository URIs should look like. Perhaps this can be solved with a few more words, examples, and/or links to the upstream doc? Thank you! Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index acf35357a60..d2643cf7fd9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41102,10 +41102,13 @@ Miscellaneous Services following configuration: @lisp +(use-service-modules backup @dots{}) ;for 'restic-backup-service-type' +(use-package-modules sync @dots{}) ;for 'rclone' + (operating-system - - (packages (list "rclone")) - + ;; @dots{} + (packages (append (list rclone) ;for use by restic + %base-packages)) (services (list (service restic-backup-service-type @@ -41127,7 +41130,8 @@ Miscellaneous Services Each @code{restic-backup-job} translates to an mcron job which sets the @env{RESTIC_PASSWORD} environment variable by reading the first line of -@code{password-file} and runs @command{restic backup}. +@code{password-file} and runs @command{restic backup}, creating backups +using rclone of all the files listed in the @code{files} field. The @code{restic-backup-service-type} installs as well @code{restic-guix} to the system profile, a @code{restic} utility wrapper that allows for easier