backup.scm 49 KB

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