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