From: Oleg Pykhalov <go.wigust@gmail.com>
To: 31818@debbugs.gnu.org
Subject: [bug#31818] [PATCH] gnu: Add restic.
Date: Wed, 13 Jun 2018 22:18:19 +0300 [thread overview]
Message-ID: <20180613191819.7460-1-go.wigust@gmail.com> (raw)
* gnu/packages/backup.scm (restic): New variable.
---
gnu/packages/backup.scm | 88 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 711bd3224..16c5c7e6f 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
@@ -45,6 +47,7 @@
#:use-module (gnu packages ftp)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages gperf)
#:use-module (gnu packages guile)
#:use-module (gnu packages linux)
@@ -822,3 +825,88 @@ file systems with unattended creation and expiration. A dirvish backup vault
is like a time machine for your data. ")
(license (license:fsf-free "file://COPYING"
"Open Software License 2.0"))))
+
+(define-public restic
+ (package
+ (name "restic")
+ (version "0.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/restic/restic/releases/download/"
+ "v" version "/restic-" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "15f0rsm2lxk4lmn4773q28g49p68pqyyx0ccp7r556asan73p79m"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/restic/restic"
+ ;; We don't need to install the source code for end-user applications.
+ #:install-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion (string-append
+ "src/github.com/restic/restic/restic-"
+ ,version)
+ (invoke "go" "run" "build.go"))))
+
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (utils (assoc-ref outputs "utils"))
+ (src (string-append "src/github.com/restic/restic/restic-"
+ ,version)))
+ (install-file (string-append src "/restic")
+ (string-append out "/bin"))
+ (delete-file (string-append src "/restic"))
+ #t)))
+
+ (add-after 'install 'install-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man "/share/man")
+ (man-section (string-append man "/man"))
+ (src (string-append "src/github.com/restic/restic/restic-"
+ ,version "/doc/man/")))
+ ;; Install all the man pages to "out".
+ (for-each
+ (lambda (file)
+ (install-file file
+ (string-append out man-section
+ (string-take-right file 1))))
+ (find-files src "\\.[1-9]"))
+ #t))))))
+ (home-page "https://restic.net/")
+ (synopsis "Backup program with multiple revisions, encryption and more")
+ (description "Restic is a program that does backups right and was designed
+with the following principles in mind:
+
+@itemize
+@item Easy: Doing backups should be a frictionless process, otherwise you
+might be tempted to skip it. Restic should be easy to configure and use, so
+that, in the event of a data loss, you can just restore it. Likewise,
+restoring data should not be complicated.
+
+@item Fast: Backing up your data with restic should only be limited by your
+network or hard disk bandwidth so that you can backup your files every day.
+Nobody does backups if it takes too much time. Restoring backups should only
+transfer data that is needed for the files that are to be restored, so that
+this process is also fast.
+
+@item Verifiable: Much more important than backup is restore, so restic
+enables you to easily verify that all data can be restored. @item Secure:
+Restic uses cryptography to guarantee confidentiality and integrity of your
+data. The location the backup data is stored is assumed not to be a trusted
+environment (e.g. a shared space where others like system administrators are
+able to access your backups). Restic is built to secure your data against
+such attackers.
+
+@item Efficient: With the growth of data, additional snapshots should only
+take the storage of the actual increment. Even more, duplicate data should be
+de-duplicated before it is actually written to the storage back end to save
+precious backup space.
+@end itemize")
+ (license license:bsd-2)))
--
2.17.1
next reply other threads:[~2018-06-13 19:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 19:18 Oleg Pykhalov [this message]
2018-06-14 1:26 ` [bug#31818] [PATCH] gnu: Add restic Leo Famulari
2018-06-14 13:58 ` Oleg Pykhalov
2018-06-14 19:06 ` Leo Famulari
2018-06-16 18:54 ` Oleg Pykhalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180613191819.7460-1-go.wigust@gmail.com \
--to=go.wigust@gmail.com \
--cc=31818@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).