Commit | Line | Data |
---|---|---|
d1a5439b | 1 | ;;; GNU Guix --- Functional package management for GNU |
aa90f2cd | 2 | ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org> |
29a7c98a | 3 | ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> |
d265169b | 4 | ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name> |
fb6112e9 | 5 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
0da4f365 | 6 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> |
a2fa9c3d | 7 | ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> |
3c8ba11a | 8 | ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> |
4ac8d486 | 9 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
0ff4425c | 10 | ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org> |
44dd001d | 11 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
1a3aa5ba | 12 | ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> |
f77886c1 | 13 | ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> |
1e957fab | 14 | ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
c824dedf | 15 | ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com> |
80ba43b5 | 16 | ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> |
5fd395db | 17 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
d1a5439b EB |
18 | ;;; |
19 | ;;; This file is part of GNU Guix. | |
20 | ;;; | |
21 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
22 | ;;; under the terms of the GNU General Public License as published by | |
23 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
24 | ;;; your option) any later version. | |
25 | ;;; | |
26 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
27 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
28 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | ;;; GNU General Public License for more details. | |
30 | ;;; | |
31 | ;;; You should have received a copy of the GNU General Public License | |
32 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
33 | ||
34 | (define-module (gnu packages backup) | |
35 | #:use-module (guix packages) | |
b5b73a82 | 36 | #:use-module ((guix licenses) #:prefix license:) |
5cdbdc2b | 37 | #:use-module (guix git-download) |
d1a5439b | 38 | #:use-module (guix download) |
29a7c98a | 39 | #:use-module (guix utils) |
2d762953 | 40 | #:use-module (guix build-system gnu) |
f77886c1 | 41 | #:use-module (guix build-system go) |
d1a5439b EB |
42 | #:use-module (guix build-system python) |
43 | #:use-module (gnu packages) | |
0c146750 | 44 | #:use-module (gnu packages acl) |
f6875394 | 45 | #:use-module (gnu packages autotools) |
2d762953 | 46 | #:use-module (gnu packages base) |
ac257f12 | 47 | #:use-module (gnu packages check) |
2d762953 | 48 | #:use-module (gnu packages compression) |
19278d8d | 49 | #:use-module (gnu packages crypto) |
362f496d | 50 | #:use-module (gnu packages databases) |
7b9b203a | 51 | #:use-module (gnu packages datastructures) |
255d1bbe | 52 | #:use-module (gnu packages dbm) |
d42e6122 | 53 | #:use-module (gnu packages dejagnu) |
2903ee1e | 54 | #:use-module (gnu packages ftp) |
2d762953 | 55 | #:use-module (gnu packages glib) |
d1a5439b | 56 | #:use-module (gnu packages gnupg) |
f77886c1 | 57 | #:use-module (gnu packages golang) |
362f496d LC |
58 | #:use-module (gnu packages gperf) |
59 | #:use-module (gnu packages guile) | |
335bc683 | 60 | #:use-module (gnu packages linux) |
2d762953 | 61 | #:use-module (gnu packages mcrypt) |
d42e6122 EB |
62 | #:use-module (gnu packages nettle) |
63 | #:use-module (gnu packages pcre) | |
0da4f365 | 64 | #:use-module (gnu packages perl) |
2d762953 | 65 | #:use-module (gnu packages pkg-config) |
0c146750 | 66 | #:use-module (gnu packages python) |
cc6f4912 | 67 | #:use-module (gnu packages python-crypto) |
1b2f753d | 68 | #:use-module (gnu packages python-web) |
44d10b1f | 69 | #:use-module (gnu packages python-xyz) |
d1a5439b | 70 | #:use-module (gnu packages rsync) |
2d762953 | 71 | #:use-module (gnu packages ssh) |
0c146750 | 72 | #:use-module (gnu packages tls) |
29a7c98a | 73 | #:use-module (gnu packages xml)) |
d1a5439b EB |
74 | |
75 | (define-public duplicity | |
76 | (package | |
77 | (name "duplicity") | |
8a859781 | 78 | (version "0.7.19") |
d1a5439b EB |
79 | (source |
80 | (origin | |
81 | (method url-fetch) | |
82 | (uri (string-append "https://code.launchpad.net/duplicity/" | |
29a7c98a | 83 | (version-major+minor version) |
d1a5439b EB |
84 | "-series/" version "/+download/duplicity-" |
85 | version ".tar.gz")) | |
86 | (sha256 | |
8a859781 | 87 | (base32 "0ag9dknslxlasslwfjhqgcqbkb1mvzzx93ry7lch2lfzcdd91am6")))) |
d1a5439b EB |
88 | (build-system python-build-system) |
89 | (native-inputs | |
02489a66 | 90 | `(("util-linux" ,util-linux) ; setsid command, for the tests |
8ef8de79 | 91 | ("par2cmdline" ,par2cmdline) |
2903ee1e | 92 | ("python-pexpect" ,python2-pexpect) |
2dfb9bbf | 93 | ("python-fasteners" ,python2-fasteners) |
2903ee1e TD |
94 | ("mock" ,python2-mock))) |
95 | (propagated-inputs | |
96 | `(("lockfile" ,python2-lockfile) | |
97 | ("urllib3" ,python2-urllib3))) | |
d1a5439b | 98 | (inputs |
584dbd85 | 99 | `(("librsync" ,librsync-0.9) |
2903ee1e | 100 | ("lftp" ,lftp) |
02489a66 TGR |
101 | ("gnupg" ,gnupg) ; gpg executable needed |
102 | ("util-linux" ,util-linux) ; for setsid | |
335bc683 | 103 | ("tzdata" ,tzdata))) |
d1a5439b | 104 | (arguments |
02489a66 | 105 | `(#:python ,python-2 ; setup assumes Python 2 |
d1a5439b | 106 | #:test-target "test" |
ad04bd6b MB |
107 | #:phases |
108 | (modify-phases %standard-phases | |
7bb7920f | 109 | (add-before 'build 'use-store-file-names |
ad04bd6b | 110 | (lambda* (#:key inputs #:allow-other-keys) |
8ef8de79 MB |
111 | (substitute* "duplicity/gpginterface.py" |
112 | (("self.call = 'gpg'") | |
113 | (string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'"))) | |
e61f092c | 114 | |
8ef8de79 MB |
115 | (substitute* '("testing/functional/__init__.py" |
116 | "testing/overrides/bin/lftp") | |
ad04bd6b | 117 | (("/bin/sh") (which "sh"))) |
8ef8de79 MB |
118 | #t)) |
119 | (add-before 'check 'check-setup | |
120 | (lambda* (#:key inputs #:allow-other-keys) | |
02489a66 TGR |
121 | (setenv "HOME" (getcwd)) ; gpg needs to write to $HOME |
122 | (setenv "TZDIR" ; some timestamp checks need TZDIR | |
ad04bd6b MB |
123 | (string-append (assoc-ref inputs "tzdata") |
124 | "/share/zoneinfo")) | |
125 | #t))))) | |
d1a5439b EB |
126 | (home-page "http://duplicity.nongnu.org/index.html") |
127 | (synopsis "Encrypted backup using rsync algorithm") | |
128 | (description | |
129 | "Duplicity backs up directories by producing encrypted tar-format volumes | |
130 | and uploading them to a remote or local file server. Because duplicity uses | |
131 | librsync, the incremental archives are space efficient and only record the | |
132 | parts of files that have changed since the last backup. Because duplicity | |
133 | uses GnuPG to encrypt and/or sign these archives, they will be safe from | |
134 | spying and/or modification by the server.") | |
b0e3635e | 135 | (license license:gpl2+))) |
2d762953 | 136 | |
f6875394 BT |
137 | (define-public par2cmdline |
138 | (package | |
139 | (name "par2cmdline") | |
44dd001d | 140 | (version "0.8.0") |
f6875394 | 141 | (source (origin |
5cdbdc2b RW |
142 | (method git-fetch) |
143 | (uri (git-reference | |
144 | (url "https://github.com/Parchive/par2cmdline.git") | |
145 | (commit (string-append "v" version)))) | |
146 | (file-name (git-file-name name version)) | |
f6875394 BT |
147 | (sha256 |
148 | (base32 | |
5cdbdc2b | 149 | "0f1jsd5sw2wynjzi7yjqjaf13yhyjfdid91p8yh0jn32y03kjyrz")))) |
f6875394 BT |
150 | (native-inputs |
151 | `(("automake" ,automake) | |
152 | ("autoconf" ,autoconf))) | |
153 | (build-system gnu-build-system) | |
f6d59ecf TGR |
154 | (synopsis "File verification and repair tools") |
155 | (description "Par2cmdline uses Reed-Solomon error-correcting codes to | |
156 | generate and verify PAR2 recovery files. These files can be distributed | |
157 | alongside the source files or stored together with back-ups to protect against | |
158 | transmission errors or @dfn{bit rot}, the degradation of storage media over | |
159 | time. | |
160 | Unlike a simple checksum, PAR2 doesn't merely detect errors: as long as the | |
a2dd9270 TGR |
161 | damage isn't too extensive (and smaller than the size of the recovery file), it |
162 | can even repair them.") | |
f6875394 BT |
163 | (home-page "https://github.com/Parchive/par2cmdline") |
164 | (license license:gpl3+))) | |
165 | ||
2d762953 EB |
166 | (define-public hdup |
167 | (package | |
168 | (name "hdup") | |
169 | (version "2.0.14") | |
170 | (source | |
171 | (origin | |
172 | (method url-fetch) | |
35d28c60 | 173 | (uri "https://fossies.org/linux/privat/old/hdup-2.0.14.tar.bz2") |
2d762953 EB |
174 | (sha256 |
175 | (base32 | |
176 | "02bnczg01cyhajmm4rhbnc0ja0dd9ikv9fwv28asxh1rlx9yr0b7")))) | |
177 | (build-system gnu-build-system) | |
178 | (native-inputs `(("pkg-config" ,pkg-config))) | |
179 | (inputs | |
180 | `(("glib" ,glib) | |
181 | ("tar" ,tar) | |
182 | ("lzop" ,lzop) | |
183 | ("mcrypt" ,mcrypt) | |
184 | ("openssh" ,openssh) | |
185 | ("gnupg" ,gnupg-1))) | |
186 | (arguments | |
187 | `(#:configure-flags | |
188 | `(,(string-append "--sbindir=" (assoc-ref %outputs "out") "/bin")) | |
189 | #:tests? #f)) | |
4a635d3d TGR |
190 | (home-page (string-append "http://web.archive.org/web/20150925223424/" |
191 | "http://archive.miek.nl/projects/hdup/index.html")) | |
2d762953 EB |
192 | (synopsis "Simple incremental backup tool") |
193 | (description | |
69b4ffcf | 194 | "Hdup2 is a backup utility, its aim is to make backup really simple. The |
2d762953 EB |
195 | backup scheduling is done by means of a cron job. It supports an |
196 | include/exclude mechanism, remote backups, encrypted backups and split | |
197 | backups (called chunks) to allow easy burning to CD/DVD.") | |
b0e3635e LC |
198 | (license license:gpl2))) |
199 | ||
200 | (define-public libarchive | |
201 | (package | |
202 | (name "libarchive") | |
ef2782d7 | 203 | (version "3.4.1") |
b0e3635e LC |
204 | (source |
205 | (origin | |
206 | (method url-fetch) | |
549f4091 | 207 | (uri (list (string-append "https://libarchive.org/downloads/libarchive-" |
ef2782d7 | 208 | version ".tar.xz") |
549f4091 MB |
209 | (string-append "https://github.com/libarchive/libarchive" |
210 | "/releases/download/v" version "/libarchive-" | |
ef2782d7 | 211 | version ".tar.xz"))) |
b0e3635e LC |
212 | (sha256 |
213 | (base32 | |
ef2782d7 | 214 | "1xs2c3fsss1g2a6yzip98j9bl93pxd3gqwr4ivh2fc6c10py115v")))) |
b0e3635e LC |
215 | (build-system gnu-build-system) |
216 | (inputs | |
80ba43b5 | 217 | `(("bzip2" ,bzip2) |
b0e3635e | 218 | ("libxml2" ,libxml2) |
80ba43b5 MB |
219 | ("lzo" ,lzo) |
220 | ("nettle" ,nettle) | |
221 | ("xz" ,xz) | |
222 | ("zlib" ,zlib) | |
223 | ("zstd" ,zstd "lib"))) | |
b0e3635e | 224 | (arguments |
f8071e9b MB |
225 | `(#:configure-flags '("--disable-static") |
226 | #:phases | |
4ac8d486 EF |
227 | (modify-phases %standard-phases |
228 | (add-before 'build 'patch-pwd | |
229 | (lambda _ | |
230 | (substitute* "Makefile" | |
6266b8bc EF |
231 | (("/bin/pwd") (which "pwd"))) |
232 | #t)) | |
4ac8d486 | 233 | (replace 'check |
5fd395db MO |
234 | (lambda* (#:key (tests? #t) #:allow-other-keys) |
235 | (if tests? | |
236 | ;; XXX: The test_owner_parse, test_read_disk, and | |
237 | ;; test_write_disk_lookup tests expect user 'root' to | |
238 | ;; exist, but the chroot's /etc/passwd doesn't have | |
239 | ;; it. Turn off those tests. | |
240 | ;; | |
241 | ;; XXX: Adjust test that fails with zstd 1.4.1 | |
242 | ;; because the default options compresses two bytes | |
243 | ;; better than this test expects. | |
244 | ;; https://github.com/libarchive/libarchive/issues/1226 | |
245 | (begin | |
246 | (substitute* "libarchive/test/test_write_filter_zstd.c" | |
247 | (("compression-level\", \"6\"") | |
248 | "compression-level\", \"7\"")) | |
249 | ||
250 | ;; The tests allow one to disable tests matching a globbing pattern. | |
251 | (invoke "make" | |
252 | "libarchive_test" | |
253 | "bsdcpio_test" | |
254 | "bsdtar_test") | |
80ba43b5 | 255 | |
5fd395db MO |
256 | ;; XXX: This glob disables too much. |
257 | (invoke "./libarchive_test" "^test_*_disk*") | |
258 | (invoke "./bsdcpio_test" "^test_owner_parse") | |
259 | (invoke "./bsdtar_test")) | |
260 | ;; Tests may be disabled if cross-compiling. | |
261 | (format #t "Test suite not run.~%")))) | |
5294836d LC |
262 | (add-after 'install 'add--L-in-libarchive-pc |
263 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
264 | (let* ((out (assoc-ref outputs "out")) | |
265 | (lib (string-append out "/lib")) | |
266 | (nettle (assoc-ref inputs "nettle")) | |
267 | (libxml2 (assoc-ref inputs "libxml2")) | |
268 | (xz (assoc-ref inputs "xz")) | |
269 | (zlib (assoc-ref inputs "zlib")) | |
80ba43b5 | 270 | (zstd (assoc-ref inputs "zstd")) |
5294836d | 271 | (bzip2 (assoc-ref inputs "bzip2"))) |
1664e2ab MB |
272 | ;; Embed absolute references to these inputs to avoid propagation. |
273 | (substitute* (list (string-append lib "/pkgconfig/libarchive.pc") | |
274 | (string-append lib "/libarchive.la")) | |
5294836d LC |
275 | (("-lnettle") |
276 | (string-append "-L" nettle "/lib -lnettle")) | |
277 | (("-lxml2") | |
278 | (string-append "-L" libxml2 "/lib -lxml2")) | |
279 | (("-llzma") | |
280 | (string-append "-L" xz "/lib -llzma")) | |
281 | (("-lz") | |
282 | (string-append "-L" zlib "/lib -lz")) | |
80ba43b5 MB |
283 | (("-lzstd") |
284 | (string-append "-L" zstd "/lib -lzstd")) | |
5294836d LC |
285 | (("-lbz2") |
286 | (string-append "-L" bzip2 "/lib -lbz2"))) | |
7ce9139f | 287 | #t)))))) |
c824dedf | 288 | (home-page "https://libarchive.org/") |
b0e3635e LC |
289 | (synopsis "Multi-format archive and compression library") |
290 | (description | |
291 | "Libarchive provides a flexible interface for reading and writing | |
292 | archives in various formats such as tar and cpio. Libarchive also supports | |
293 | reading and writing archives compressed using various compression filters such | |
294 | as gzip and bzip2. The library is inherently stream-oriented; readers | |
295 | serially iterate through the archive, writers serially add things to the | |
35b9e423 | 296 | archive. In particular, note that there is currently no built-in support for |
b0e3635e LC |
297 | random access nor for in-place modification.") |
298 | (license license:bsd-2))) | |
d42e6122 EB |
299 | |
300 | (define-public rdup | |
301 | (package | |
302 | (name "rdup") | |
fbf210cb | 303 | (version "1.1.15") |
d42e6122 EB |
304 | (source |
305 | (origin | |
658ef2ec TGR |
306 | (method git-fetch) |
307 | (uri (git-reference | |
308 | (url "https://github.com/miekg/rdup.git") | |
309 | (commit version))) | |
310 | (file-name (git-file-name name version)) | |
d42e6122 | 311 | (sha256 |
658ef2ec | 312 | (base32 "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw")))) |
d42e6122 EB |
313 | (build-system gnu-build-system) |
314 | (native-inputs | |
fbf210cb TGR |
315 | `(("autoconf" ,autoconf) |
316 | ("automake" ,automake) | |
317 | ("pkg-config" ,pkg-config) | |
318 | ||
319 | ;; For tests. | |
d42e6122 EB |
320 | ("dejagnu" ,dejagnu))) |
321 | (inputs | |
d939b295 TGR |
322 | ;; XXX Compiling with nettle (encryption) support requires patching out |
323 | ;; -Werror from GNUmakefile.in. Then, rdup-tr-{en,de}crypt tests fail: | |
324 | ;; free(): invalid pointer | |
325 | ;; ** rdup-tr: SIGPIPE received, exiting | |
d42e6122 EB |
326 | `(("glib" ,glib) |
327 | ("pcre" ,pcre) | |
328 | ("libarchive" ,libarchive) | |
d939b295 | 329 | ("mcrypt" ,mcrypt))) |
d42e6122 EB |
330 | (arguments |
331 | `(#:parallel-build? #f ;race conditions | |
dc1d3cde KK |
332 | #:phases |
333 | (modify-phases %standard-phases | |
fbf210cb TGR |
334 | (add-before 'build 'qualify-inputs |
335 | (lambda* (#:key inputs #:allow-other-keys) | |
336 | ;; This script is full of pitfalls. Fix some that particularly | |
337 | ;; affect Guix users & leave the rest as reader excercises. | |
338 | (substitute* "rdup-simple" | |
339 | ;; Use the input ‘mcrypt’, not whatever's in $PATH at run time. | |
340 | (("([' ])mcrypt " all delimiter) | |
341 | (string-append delimiter (which "mcrypt") " ")) | |
342 | ;; Avoid frivolous dependency on ‘which’ with a shell builtin. | |
343 | (("which") "command -v")) | |
dc1d3cde | 344 | #t)) |
d939b295 TGR |
345 | (add-before 'check 'disable-encryption-tests |
346 | (lambda _ | |
347 | (for-each delete-file | |
348 | (list "testsuite/rdup/rdup.rdup-tr-crypt.exp" | |
349 | "testsuite/rdup/rdup.rdup-tr-decrypt.exp" | |
350 | "testsuite/rdup/rdup.rdup-tr-encrypt.exp")) | |
351 | #t)) | |
dc1d3cde KK |
352 | (add-before 'check 'pre-check |
353 | (lambda _ | |
354 | (setenv "HOME" (getcwd)) | |
355 | (substitute* "testsuite/rdup/rdup.rdup-up-t-with-file.exp" | |
356 | (("/bin/cat") (which "cat"))) | |
357 | #t))))) | |
fbf210cb | 358 | (home-page "https://github.com/miekg/rdup") |
d42e6122 EB |
359 | (synopsis "Provide a list of files to backup") |
360 | (description | |
361 | "Rdup is a utility inspired by rsync and the plan9 way of doing backups. | |
362 | Rdup itself does not backup anything, it only print a list of absolute | |
e881752c | 363 | file names to standard output. Auxiliary scripts are needed that act on this |
d42e6122 | 364 | list and implement the backup strategy.") |
b0e3635e | 365 | (license license:gpl3+))) |
22c24621 EB |
366 | |
367 | (define-public btar | |
368 | (package | |
369 | (name "btar") | |
370 | (version "1.1.1") | |
371 | (source | |
372 | (origin | |
373 | (method url-fetch) | |
374 | (uri (string-append "http://vicerveza.homeunix.net/~viric/soft/btar/" | |
375 | "btar-" version ".tar.gz")) | |
376 | (sha256 | |
377 | (base32 | |
378 | "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd")))) | |
379 | (build-system gnu-build-system) | |
380 | (inputs | |
584dbd85 | 381 | `(("librsync" ,librsync-0.9))) |
22c24621 EB |
382 | (arguments |
383 | `(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out")) | |
384 | "CC=gcc") | |
385 | #:tests? #f ;test input not distributed | |
386 | #:phases | |
dc1d3cde KK |
387 | ;; no configure phase |
388 | (modify-phases %standard-phases | |
389 | (delete 'configure)))) | |
22c24621 EB |
390 | (home-page "http://viric.name/cgi-bin/btar/doc/trunk/doc/home.wiki") |
391 | (synopsis "Tar-compatible archiver") | |
392 | (description | |
393 | "Btar is a tar-compatible archiver which allows arbitrary compression and | |
394 | ciphering, redundancy, differential backup, indexed extraction, multicore | |
395 | compression, input and output serialisation, and tolerance to partial archive | |
396 | errors.") | |
b0e3635e | 397 | (license license:gpl3+))) |
bd3fc08c EB |
398 | |
399 | (define-public rdiff-backup | |
400 | (package | |
401 | (name "rdiff-backup") | |
402 | (version "1.2.8") | |
403 | (source | |
404 | (origin | |
405 | (method url-fetch) | |
406 | (uri (string-append "mirror://savannah/rdiff-backup/rdiff-backup-" | |
407 | version ".tar.gz")) | |
408 | (sha256 | |
409 | (base32 | |
410 | "1nwmmh816f96h0ff1jxk95ad38ilbhbdl5dgibx1d4cl81dsi48d")))) | |
411 | (build-system python-build-system) | |
bd3fc08c EB |
412 | (inputs |
413 | `(("python" ,python-2) | |
584dbd85 | 414 | ("librsync" ,librsync-0.9))) |
bd3fc08c EB |
415 | (arguments |
416 | `(#:python ,python-2 | |
417 | #:tests? #f)) | |
340978d7 | 418 | (home-page "https://www.nongnu.org/rdiff-backup/") |
bd3fc08c EB |
419 | (synopsis "Local/remote mirroring+incremental backup") |
420 | (description | |
421 | "Rdiff-backup backs up one directory to another, possibly over a network. | |
422 | The target directory ends up a copy of the source directory, but extra reverse | |
423 | diffs are stored in a special subdirectory of that target directory, so you | |
424 | can still recover files lost some time ago. The idea is to combine the best | |
425 | features of a mirror and an incremental backup. Rdiff-backup also preserves | |
426 | subdirectories, hard links, dev files, permissions, uid/gid ownership, | |
427 | modification times, extended attributes, acls, and resource forks. Also, | |
428 | rdiff-backup can operate in a bandwidth efficient manner over a pipe, like | |
429 | rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up | |
430 | to a remote location, and only the differences will be transmitted. Finally, | |
e881752c | 431 | rdiff-backup is easy to use and settings have sensible defaults.") |
b0e3635e | 432 | (license license:gpl2+))) |
0c146750 | 433 | |
0da4f365 TD |
434 | (define-public rsnapshot |
435 | (package | |
436 | (name "rsnapshot") | |
c57c648b | 437 | (version "1.4.3") |
0da4f365 TD |
438 | (source |
439 | (origin | |
440 | (method url-fetch) | |
441 | (uri (string-append | |
442 | "https://github.com/rsnapshot/rsnapshot/releases/download/" | |
443 | version "/rsnapshot-" version ".tar.gz")) | |
444 | (sha256 | |
c57c648b | 445 | (base32 "1lavqmmsf53pim0nvming7fkng6p0nk2a51k2c2jdq0l7snpl31b")))) |
0da4f365 TD |
446 | (build-system gnu-build-system) |
447 | (arguments | |
448 | `(#:phases | |
449 | (modify-phases %standard-phases | |
450 | (replace 'check | |
451 | (lambda _ | |
452 | (substitute* '("t/cmd-post_pre-exec/conf/pre-true-post-true.conf" | |
453 | "t/backup_exec/conf/backup_exec_fail.conf" | |
454 | "t/backup_exec/conf/backup_exec.conf") | |
455 | (("/bin/true") (which "true")) | |
456 | (("/bin/false") (which "false"))) | |
c57c648b TGR |
457 | |
458 | ;; Disable a test that tries to connect to localhost on port 22. | |
459 | (delete-file "t/ssh_args/ssh_args.t.in") | |
460 | ||
4ce7c1b3 | 461 | (invoke "make" "test")))))) |
0da4f365 TD |
462 | (inputs |
463 | `(("perl" ,perl) | |
464 | ("rsync" ,rsync))) | |
465 | (home-page "http://rsnapshot.org") | |
466 | (synopsis "Deduplicating snapshot backup utility based on rsync") | |
162a1374 | 467 | (description "rsnapshot is a file system snapshot utility based on rsync. |
0da4f365 TD |
468 | rsnapshot makes it easy to make periodic snapshots of local machines, and |
469 | remote machines over SSH. To reduce the disk space required for each backup, | |
470 | rsnapshot uses hard links to deduplicate identical files.") | |
471 | (license license:gpl2+))) | |
472 | ||
362f496d LC |
473 | (define-public libchop |
474 | (package | |
475 | (name "libchop") | |
476 | (version "0.5.2") | |
477 | (source (origin | |
478 | (method url-fetch) | |
479 | (uri (string-append "mirror://savannah/libchop/libchop-" | |
480 | version ".tar.gz")) | |
481 | (sha256 | |
482 | (base32 | |
483 | "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g")) | |
fc1adab1 | 484 | (patches (search-patches "diffutils-gets-undeclared.patch")))) |
362f496d | 485 | (build-system gnu-build-system) |
6d1a7ce8 LC |
486 | (arguments |
487 | '(#:phases (modify-phases %standard-phases | |
488 | (add-before 'configure 'adjust-configure-script | |
489 | (lambda _ | |
490 | ;; Mimic upstream commit | |
491 | ;; 25750ab5ef82fd3cfce5205d5f1ef07b47098091. | |
492 | (substitute* "configure" | |
493 | (("GUILE=(.*)--variable bindir`" _ middle) | |
494 | (string-append "GUILE=" middle | |
495 | "--variable bindir`/guile"))) | |
496 | #t)) | |
497 | (add-before 'check 'skip-test | |
498 | (lambda _ | |
499 | ;; XXX: This test fails (1) because current GnuTLS no | |
500 | ;; longer supports OpenPGP authentication, and (2) for | |
501 | ;; some obscure reason. Better skip it. | |
502 | (setenv "XFAIL_TESTS" "utils/block-server") | |
503 | #t))))) | |
362f496d LC |
504 | (native-inputs |
505 | `(("guile" ,guile-2.0) | |
c9f898cd | 506 | ("gperf" ,gperf-3.0) ;see <https://bugs.gnu.org/32382> |
362f496d LC |
507 | ("pkg-config" ,pkg-config))) |
508 | (inputs | |
509 | `(("guile" ,guile-2.0) | |
510 | ("util-linux" ,util-linux) | |
511 | ("gnutls" ,gnutls) | |
512 | ("tdb" ,tdb) | |
513 | ("bdb" ,bdb) | |
514 | ("gdbm" ,gdbm) | |
515 | ("libgcrypt" ,libgcrypt) | |
516 | ("lzo" ,lzo) | |
517 | ("bzip2" ,bzip2) | |
518 | ("zlib" ,zlib))) | |
340978d7 | 519 | (home-page "https://nongnu.org/libchop/") |
362f496d LC |
520 | (synopsis "Tools & library for data backup and distributed storage") |
521 | (description | |
522 | "Libchop is a set of utilities and library for data backup and | |
523 | distributed storage. Its main application is @command{chop-backup}, an | |
524 | encrypted backup program that supports data integrity checks, versioning, | |
525 | distribution among several sites, selective sharing of stored data, adaptive | |
526 | compression, and more. The library itself implements storage techniques such | |
527 | as content-addressable storage, content hash keys, Merkle trees, similarity | |
528 | detection, and lossless compression.") | |
529 | (license license:gpl3+))) | |
6fc5c11b LF |
530 | |
531 | (define-public borg | |
532 | (package | |
533 | (name "borg") | |
d46fc636 | 534 | (version "1.1.10") |
c4556777 TGR |
535 | (source |
536 | (origin | |
537 | (method url-fetch) | |
538 | (uri (pypi-uri "borgbackup" version)) | |
539 | (sha256 | |
d46fc636 | 540 | (base32 "1pp70p4n5kamvcbl4d8021ggrxhyykmg9isjg4yd3wags8b19d7g")) |
c4556777 TGR |
541 | (modules '((guix build utils))) |
542 | (snippet | |
543 | '(begin | |
5a3bf255 LF |
544 | ;; Delete files generated by Cython. We used to have a regex |
545 | ;; that created the list of generated files but Borg has | |
546 | ;; added new non-generated C files that cause the regex to | |
547 | ;; generate the wrong list. | |
c4556777 | 548 | (for-each delete-file |
5a3bf255 LF |
549 | '("src/borg/algorithms/checksums.c" |
550 | "src/borg/chunker.c" | |
551 | "src/borg/compress.c" | |
552 | "src/borg/crypto/low_level.c" | |
553 | "src/borg/hashindex.c" | |
554 | "src/borg/item.c" | |
555 | "src/borg/platform/darwin.c" | |
556 | "src/borg/platform/freebsd.c" | |
557 | "src/borg/platform/linux.c" | |
558 | "src/borg/platform/posix.c")) | |
c4556777 TGR |
559 | ;; Remove bundled shared libraries. |
560 | (with-directory-excursion "src/borg/algorithms" | |
561 | (for-each delete-file-recursively | |
d46fc636 TGR |
562 | (list "blake2" "lz4" "msgpack" "zstd"))) |
563 | ;; Purge some msgpack references from setup.py or the resulting | |
564 | ;; sources will be unbuildable. | |
565 | (substitute* "setup.py" | |
566 | ((".*Extension\\('borg\\.algorithms\\.msgpack\\..*") "") | |
567 | (("msgpack_packer_source, msgpack_unpacker_source") "")) | |
6cbee49d | 568 | #t)))) |
6fc5c11b LF |
569 | (build-system python-build-system) |
570 | (arguments | |
c21b1a1f LF |
571 | `(#:modules ((srfi srfi-26) ; for cut |
572 | (guix build utils) | |
573 | (guix build python-build-system)) | |
574 | #:phases | |
6fc5c11b LF |
575 | (modify-phases %standard-phases |
576 | (add-after 'unpack 'set-env | |
577 | (lambda* (#:key inputs #:allow-other-keys) | |
578 | (let ((openssl (assoc-ref inputs "openssl")) | |
19278d8d | 579 | (libb2 (assoc-ref inputs "libb2")) |
c4556777 TGR |
580 | (lz4 (assoc-ref inputs "lz4")) |
581 | (zstd (assoc-ref inputs "zstd"))) | |
6fc5c11b | 582 | (setenv "BORG_OPENSSL_PREFIX" openssl) |
19278d8d | 583 | (setenv "BORG_LIBB2_PREFIX" libb2) |
c4556777 TGR |
584 | (setenv "BORG_LIBLZ4_PREFIX" lz4) |
585 | (setenv "BORG_LIBZSTD_PREFIX" zstd) | |
6fc5c11b | 586 | (setenv "PYTHON_EGG_CACHE" "/tmp") |
b4f91d0e LF |
587 | ;; The test 'test_return_codes[python]' fails when |
588 | ;; HOME=/homeless-shelter. | |
589 | (setenv "HOME" "/tmp") | |
6fc5c11b | 590 | #t))) |
d46fc636 TGR |
591 | (add-after 'unpack 'use-system-msgpack |
592 | (lambda _ | |
593 | (substitute* "src/borg/helpers.py" | |
594 | (("prefer_system_msgpack = False") | |
595 | "prefer_system_msgpack = True")) | |
596 | #t)) | |
b4f91d0e LF |
597 | ;; The tests need to be run after Borg is installed. |
598 | (delete 'check) | |
599 | (add-after 'install 'check | |
1d60f7c2 LF |
600 | (lambda* (#:key inputs outputs #:allow-other-keys) |
601 | ;; Make the installed package available for the test suite. | |
602 | (add-installed-pythonpath inputs outputs) | |
8cb3e7e7 LF |
603 | ;; The tests should be run in an empty directory. |
604 | (mkdir-p "tests") | |
605 | (with-directory-excursion "tests" | |
e252ec32 TGR |
606 | (invoke "py.test" "-v" "--pyargs" "borg.testsuite" "-k" |
607 | (string-append | |
608 | ;; These tests need to write to '/var'. | |
609 | "not test_get_cache_dir " | |
610 | "and not test_get_config_dir " | |
611 | "and not test_get_keys_dir " | |
612 | "and not test_get_security_dir " | |
613 | ;; These tests assume there is a root user in | |
614 | ;; '/etc/passwd'. | |
615 | "and not test_access_acl " | |
616 | "and not test_default_acl " | |
617 | "and not test_non_ascii_acl " | |
618 | ;; This test needs the unpackaged pytest-benchmark. | |
619 | "and not benchmark " | |
620 | ;; These tests assume the kernel supports FUSE. | |
621 | "and not test_fuse " | |
622 | "and not test_fuse_allow_damaged_files " | |
623 | "and not test_mount_hardlinks"))))) | |
6fc5c11b | 624 | (add-after 'install 'install-doc |
6ee4fd2a | 625 | (lambda* (#:key inputs outputs #:allow-other-keys) |
6fc5c11b | 626 | (let* ((out (assoc-ref outputs "out")) |
c21b1a1f LF |
627 | (man (string-append out "/share/man/man1")) |
628 | (misc (string-append out "/share/borg/misc"))) | |
629 | (for-each (cut install-file <> misc) | |
630 | '("docs/misc/create_chunker-params.txt" | |
631 | "docs/misc/internals-picture.txt" | |
632 | "docs/misc/prune-example.txt")) | |
e252ec32 TGR |
633 | (copy-recursively "docs/man" man) |
634 | #t)))))) | |
6fc5c11b | 635 | (native-inputs |
f99cfc19 EF |
636 | `(("python-cython" ,python-cython) |
637 | ("python-setuptools-scm" ,python-setuptools-scm) | |
d4c0053e | 638 | ("python-pytest" ,python-pytest))) |
6fc5c11b LF |
639 | (inputs |
640 | `(("acl" ,acl) | |
19278d8d | 641 | ("libb2" ,libb2) |
6fc5c11b LF |
642 | ("lz4" ,lz4) |
643 | ("openssl" ,openssl) | |
644 | ("python-llfuse" ,python-llfuse) | |
acb59d99 LF |
645 | ;; The Python msgpack library changed its name so Borg requires this |
646 | ;; transitional package for now: | |
647 | ;; <https://bugs.gnu.org/30662> | |
648 | ("python-msgpack" ,python-msgpack-transitional) | |
ec0de9d8 | 649 | ("zstd" ,zstd "lib"))) |
6fc5c11b LF |
650 | (synopsis "Deduplicated, encrypted, authenticated and compressed backups") |
651 | (description "Borg is a deduplicating backup program. Optionally, it | |
652 | supports compression and authenticated encryption. The main goal of Borg is to | |
653 | provide an efficient and secure way to backup data. The data deduplication | |
654 | technique used makes Borg suitable for daily backups since only changes are | |
655 | stored. The authenticated encryption technique makes it suitable for backups | |
656 | to not fully trusted targets. Borg is a fork of Attic.") | |
18533bcf | 657 | (home-page "https://www.borgbackup.org/") |
6fc5c11b | 658 | (license license:bsd-3))) |
b2fe9183 LF |
659 | |
660 | (define-public attic | |
661 | (package | |
662 | (name "attic") | |
663 | (version "0.16") | |
664 | (source (origin | |
665 | (method url-fetch) | |
99d17446 | 666 | (uri (pypi-uri "Attic" version)) |
b2fe9183 LF |
667 | (sha256 |
668 | (base32 | |
669 | "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) | |
670 | (build-system python-build-system) | |
671 | (arguments | |
1df6d73b LF |
672 | `(;; The tests assume they are run as root: |
673 | ;; https://github.com/jborg/attic/issues/7 | |
674 | #:tests? #f | |
675 | #:phases | |
b2fe9183 LF |
676 | (modify-phases %standard-phases |
677 | (add-before | |
678 | 'build 'set-openssl-prefix | |
679 | (lambda* (#:key inputs #:allow-other-keys) | |
680 | (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl")) | |
681 | #t))))) | |
682 | (inputs | |
683 | `(("acl" ,acl) | |
684 | ("openssl" ,openssl) | |
685 | ("python-msgpack" ,python-msgpack) | |
686 | ||
687 | ;; Attic is probably incompatible with llfuse > 0.41. | |
688 | ;; These links are to discussions of llfuse compatibility from | |
689 | ;; the borg project. Borg is a recent fork of attic, and attic | |
690 | ;; has not been updated since the fork, so it's likely that | |
691 | ;; llfuse compatibility requirements are still the same. | |
692 | ;; https://github.com/borgbackup/borg/issues/642 | |
693 | ;; https://github.com/borgbackup/borg/issues/643 | |
694 | ("python-llfuse" ,python-llfuse-0.41))) | |
695 | (synopsis "Deduplicating backup program") | |
696 | (description "Attic is a deduplicating backup program. The main goal of | |
697 | Attic is to provide an efficient and secure way to backup data. The data | |
698 | deduplication technique used makes Attic suitable for daily backups since only | |
699 | changes are stored.") | |
700 | (home-page "https://attic-backup.org/") | |
701 | (license license:bsd-3) | |
702 | (properties `((superseded . ,borg))))) | |
3b402139 TGR |
703 | |
704 | (define-public wimlib | |
705 | (package | |
706 | (name "wimlib") | |
558d36e6 | 707 | (version "1.13.1") |
3b402139 TGR |
708 | (source (origin |
709 | (method url-fetch) | |
710 | (uri (string-append "https://wimlib.net/downloads/" | |
1a05bce2 | 711 | "wimlib-" version ".tar.gz")) |
3b402139 TGR |
712 | (sha256 |
713 | (base32 | |
558d36e6 | 714 | "0pxgrpr3dr81rcf2jh71aiiq3v4anc5sj1nld18f2vhvbijbrx27")))) |
3b402139 TGR |
715 | (build-system gnu-build-system) |
716 | (native-inputs | |
717 | `(("pkg-config" ,pkg-config))) | |
718 | (inputs | |
719 | `(("fuse" ,fuse) | |
720 | ("libxml2" ,libxml2) | |
721 | ("ntfs-3g" ,ntfs-3g) | |
722 | ("openssl" ,openssl))) | |
723 | (arguments | |
724 | `(#:configure-flags (list "--enable-test-support"))) | |
725 | (home-page "https://wimlib.net/") | |
726 | (synopsis "WIM file manipulation library and utilities") | |
727 | (description "wimlib is a C library and set of command-line utilities for | |
728 | creating, modifying, extracting, and mounting archives in the Windows Imaging | |
729 | Format (@dfn{WIM files}). It can capture and apply WIMs directly from and to | |
730 | NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.") | |
731 | ;; wimlib is dual-licenced under version 3 or later of either the GPL or | |
732 | ;; LGPL, except those files explicitly marked as being released into the | |
733 | ;; public domain (CC0) in their headers. | |
734 | (license (list license:gpl3+ | |
735 | license:lgpl3+ | |
736 | license:cc0)))) | |
a2fa9c3d | 737 | |
0ff4425c CAW |
738 | (define-public dirvish |
739 | (package | |
740 | (name "dirvish") | |
741 | (version "1.2.1") | |
742 | (build-system gnu-build-system) | |
743 | (source (origin | |
744 | (method url-fetch) | |
745 | (uri (string-append | |
746 | "http://dirvish.org/dirvish-" version ".tgz")) | |
747 | (sha256 | |
748 | (base32 | |
749 | "1kbxa1irszp2zw8hd5qzqnrrzb4vxfivs1vn64yxnj0lak1jjzvb")))) | |
750 | (arguments | |
751 | `(#:modules ((ice-9 match) (ice-9 rdelim) | |
752 | ,@%gnu-build-system-modules) | |
753 | #:phases | |
754 | ;; This mostly mirrors the steps taken in the install.sh that ships | |
755 | ;; with dirvish, but simplified because we aren't prompting interactively | |
756 | (modify-phases %standard-phases | |
757 | (delete 'configure) | |
758 | (delete 'build) | |
759 | (delete 'check) | |
760 | (replace 'install | |
761 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
762 | ;; These are mostly the same steps the install.sh that comes with | |
763 | ;; dirvish does | |
764 | (let* (;; Files we'll be copying | |
765 | (executables | |
766 | '("dirvish" "dirvish-runall" | |
767 | "dirvish-expire" "dirvish-locate")) | |
768 | (man-pages | |
769 | '(("dirvish" "8") ("dirvish-runall" "8") | |
770 | ("dirvish-expire" "8") ("dirvish-locate" "8") | |
771 | ("dirvish.conf" "5"))) | |
772 | ||
773 | (output-dir | |
774 | (assoc-ref outputs "out")) | |
775 | ||
776 | ;; Just a default... not so useful on guixsd though | |
777 | ;; You probably want to a service with file(s) to point to. | |
778 | (confdir "/etc/dirvish") | |
779 | ||
780 | (perl (string-append (assoc-ref %build-inputs "perl") | |
781 | "/bin/perl")) | |
782 | (loadconfig.pl (call-with-input-file "loadconfig.pl" | |
783 | read-string))) | |
784 | ||
785 | ||
786 | (define (write-pl filename) | |
787 | (define pl-header | |
788 | (string-append "#!" perl "\n\n" | |
789 | "$CONFDIR = \"" confdir "\";\n\n")) | |
790 | (define input-file-location | |
791 | (string-append filename ".pl")) | |
792 | (define target-file-location | |
793 | (string-append output-dir "/bin/" filename ".pl")) | |
794 | (define text-to-write | |
795 | (string-append pl-header | |
796 | (call-with-input-file input-file-location | |
797 | read-string) | |
798 | "\n" loadconfig.pl)) | |
799 | (with-output-to-file target-file-location | |
800 | (lambda () | |
801 | (display text-to-write))) | |
802 | (chmod target-file-location #o755) | |
803 | (wrap-program target-file-location | |
804 | `("PERL5LIB" ":" prefix | |
805 | ,(map (lambda (l) (string-append (assoc-ref %build-inputs l) | |
806 | "/lib/perl5/site_perl")) | |
807 | '("perl-libtime-period" | |
808 | "perl-libtime-parsedate"))))) | |
809 | ||
810 | (define write-man | |
811 | (match-lambda | |
812 | ((file-base man-num) | |
813 | (let* ((filename | |
814 | (string-append file-base "." man-num)) | |
815 | (output-path | |
816 | (string-append output-dir | |
817 | "/share/man/man" man-num | |
818 | "/" filename))) | |
819 | (copy-file filename output-path))))) | |
820 | ||
821 | ;; Make directories | |
822 | (mkdir-p (string-append output-dir "/bin/")) | |
823 | (mkdir-p (string-append output-dir "/share/man/man8/")) | |
824 | (mkdir-p (string-append output-dir "/share/man/man5/")) | |
825 | ||
826 | ;; Write out executables | |
827 | (for-each write-pl executables) | |
828 | ;; Write out man pages | |
829 | (for-each write-man man-pages) | |
830 | #t)))))) | |
831 | (inputs | |
832 | `(("perl" ,perl) | |
833 | ("rsync" ,rsync) | |
834 | ("perl-libtime-period" ,perl-libtime-period) | |
835 | ("perl-libtime-parsedate" ,perl-libtime-parsedate))) | |
836 | (home-page "http://dirvish.org/") | |
837 | (synopsis "Fast, disk based, rotating network backup system") | |
838 | (description | |
839 | "With dirvish you can maintain a set of complete images of your | |
162a1374 | 840 | file systems with unattended creation and expiration. A dirvish backup vault |
0ff4425c CAW |
841 | is like a time machine for your data. ") |
842 | (license (license:fsf-free "file://COPYING" | |
843 | "Open Software License 2.0")))) | |
f77886c1 | 844 | |
f49d6909 | 845 | (define-public restic |
f77886c1 OP |
846 | (package |
847 | (name "restic") | |
40df1928 | 848 | (version "0.9.6") |
f49d6909 LF |
849 | ;; TODO Try packaging the bundled / vendored dependencies in the 'vendor/' |
850 | ;; directory. | |
f77886c1 OP |
851 | (source (origin |
852 | (method url-fetch) | |
853 | (uri (string-append | |
854 | "https://github.com/restic/restic/releases/download/" | |
855 | "v" version "/restic-" version ".tar.gz")) | |
856 | (file-name (string-append name "-" version ".tar.gz")) | |
857 | (sha256 | |
858 | (base32 | |
40df1928 | 859 | "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w")))) |
f77886c1 OP |
860 | (build-system go-build-system) |
861 | (arguments | |
862 | `(#:import-path "github.com/restic/restic" | |
f77886c1 OP |
863 | ;; We don't need to install the source code for end-user applications. |
864 | #:install-source? #f | |
865 | #:phases | |
866 | (modify-phases %standard-phases | |
867 | (replace 'build | |
868 | (lambda* (#:key inputs #:allow-other-keys) | |
fb098182 | 869 | (with-directory-excursion "src/github.com/restic/restic" |
9cac043c TGR |
870 | ;; Disable 'restic self-update'. It makes little sense in Guix. |
871 | (substitute* "build.go" (("selfupdate") "")) | |
15595644 | 872 | (setenv "HOME" (getcwd)) ; for $HOME/.cache/go-build |
f77886c1 OP |
873 | (invoke "go" "run" "build.go")))) |
874 | ||
4976ebdd OP |
875 | (replace 'check |
876 | (lambda _ | |
fb098182 | 877 | (with-directory-excursion "src/github.com/restic/restic" |
77389911 OP |
878 | ;; Disable FUSE tests. |
879 | (setenv "RESTIC_TEST_FUSE" "0") | |
4976ebdd OP |
880 | (invoke "go" "run" "build.go" "--test")))) |
881 | ||
f77886c1 OP |
882 | (replace 'install |
883 | (lambda* (#:key outputs #:allow-other-keys) | |
884 | (let ((out (assoc-ref outputs "out")) | |
fb098182 | 885 | (src "src/github.com/restic/restic")) |
f77886c1 OP |
886 | (install-file (string-append src "/restic") |
887 | (string-append out "/bin")) | |
888 | #t))) | |
889 | ||
890 | (add-after 'install 'install-docs | |
891 | (lambda* (#:key outputs #:allow-other-keys) | |
892 | (let* ((out (assoc-ref outputs "out")) | |
893 | (man "/share/man") | |
894 | (man-section (string-append man "/man")) | |
fb098182 | 895 | (src "src/github.com/restic/restic/doc/man/")) |
f77886c1 OP |
896 | ;; Install all the man pages to "out". |
897 | (for-each | |
898 | (lambda (file) | |
899 | (install-file file | |
900 | (string-append out man-section | |
901 | (string-take-right file 1)))) | |
902 | (find-files src "\\.[1-9]")) | |
903 | #t))) | |
904 | ||
905 | (add-after 'install-docs 'install-shell-completion | |
906 | (lambda* (#:key outputs #:allow-other-keys) | |
907 | (let* ((out (assoc-ref outputs "out")) | |
908 | (bin (string-append out "/bin")) | |
909 | (etc (string-append out "/etc")) | |
910 | (share (string-append out "/share"))) | |
911 | (for-each | |
912 | (lambda (shell) | |
913 | (let* ((shell-name (symbol->string shell)) | |
914 | (dir (string-append "etc/completion/" shell-name))) | |
915 | (mkdir-p dir) | |
916 | (invoke (string-append bin "/restic") "generate" | |
917 | (string-append "--" shell-name "-completion") | |
918 | (string-append dir "/" | |
919 | (case shell | |
920 | ((bash) "restic") | |
921 | ((zsh) "_restic")))))) | |
922 | '(bash zsh)) | |
923 | (with-directory-excursion "etc/completion" | |
924 | (install-file "bash/restic" | |
925 | (string-append etc "/bash_completion.d")) | |
926 | (install-file "zsh/_restic" | |
927 | (string-append share "/zsh/site-functions"))) | |
928 | #t)))))) | |
929 | (home-page "https://restic.net/") | |
930 | (synopsis "Backup program with multiple revisions, encryption and more") | |
931 | (description "Restic is a program that does backups right and was designed | |
932 | with the following principles in mind: | |
933 | ||
934 | @itemize | |
935 | @item Easy: Doing backups should be a frictionless process, otherwise you | |
936 | might be tempted to skip it. Restic should be easy to configure and use, so | |
937 | that, in the event of a data loss, you can just restore it. Likewise, | |
938 | restoring data should not be complicated. | |
939 | ||
940 | @item Fast: Backing up your data with restic should only be limited by your | |
941 | network or hard disk bandwidth so that you can backup your files every day. | |
942 | Nobody does backups if it takes too much time. Restoring backups should only | |
943 | transfer data that is needed for the files that are to be restored, so that | |
944 | this process is also fast. | |
945 | ||
946 | @item Verifiable: Much more important than backup is restore, so restic | |
947 | enables you to easily verify that all data can be restored. @item Secure: | |
948 | Restic uses cryptography to guarantee confidentiality and integrity of your | |
949 | data. The location the backup data is stored is assumed not to be a trusted | |
950 | environment (e.g. a shared space where others like system administrators are | |
951 | able to access your backups). Restic is built to secure your data against | |
952 | such attackers. | |
953 | ||
954 | @item Efficient: With the growth of data, additional snapshots should only | |
955 | take the storage of the actual increment. Even more, duplicate data should be | |
956 | de-duplicated before it is actually written to the storage back end to save | |
957 | precious backup space. | |
958 | @end itemize") | |
959 | (license license:bsd-2))) | |
7b9b203a RW |
960 | |
961 | (define-public burp | |
962 | (package | |
963 | (name "burp") | |
9d3331fc | 964 | (version "2.3.20") |
7b9b203a RW |
965 | (source (origin |
966 | (method url-fetch) | |
967 | (uri (string-append "mirror://sourceforge/burp/burp-" version | |
968 | "/burp-" version ".tar.bz2")) | |
969 | (sha256 | |
970 | (base32 | |
9d3331fc | 971 | "0dm2y76z7pg17kfv6ahmh4mf2r3pg7mlwd69lvmjwssnd9vs1nn5")))) |
7b9b203a RW |
972 | (build-system gnu-build-system) |
973 | (inputs | |
974 | `(("librsync" ,librsync) | |
975 | ("openssl" ,openssl) | |
976 | ("uthash" ,uthash) | |
977 | ("zlib" ,zlib))) | |
978 | (native-inputs | |
979 | `(("check" ,check) | |
980 | ("pkg-config" ,pkg-config))) | |
981 | (home-page "https://burp.grke.org") | |
982 | (synopsis "Differential backup and restore") | |
983 | (description "Burp is a network backup and restore program. It attempts | |
984 | to reduce network traffic and the amount of space that is used by each | |
985 | backup.") | |
986 | (license license:agpl3))) |