blob: 8977a590a463faa99d5b48218110a3ba7b3e9a95 [file] [log] [blame]
Matthias Andreas Benkard152901b2022-09-13 06:17:25 +02001// SPDX-FileCopyrightText: © 2021 Matthias Andreas Benkard <code@mail.matthias.benkard.de>
2//
3// SPDX-License-Identifier: GFDL-1.3-or-later
4
5= Mulkup
6Matthias Andreas Benkard
7// Meta
8:experimental:
9:data-uri:
10:sectnums:
11:toc:
12:stem:
13:toclevels: 2
14:description: Mulkup Manual
15:keywords: mulk
16// Settings
17:icons: font
18:source-highlighter: rouge
19
20
21A configurable https://bupstash.io[bupstash] wrapper.
22
23
24== Summary
25
26Mulkup is a backup script that wraps https://bupstash.io[bupstash].
27
28Features:
29
30 - Backup rotation (hourly, daily, weekly, monthly)
31 - Multiple stashes
32 - Exclusion lists
33
34
35== Installation
36
37=== Using Stack
38
39Outside of Nix, https://haskellstack.org/[Stack] is the easiest way to
40install Mulkup.
41
42Check out the repository and run:
43
44[source,console]
45----
46stack install
47----
48
49=== Using Nix
50
51Mulkup is available as a
52https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#description[Nix
53flake]:
54
55[source,console]
56----
57nix profile install github:benkard/mulkup
58----
59
60=== Using Cabal
61
62It is possible to install Mulkup using
63https://www.haskell.org/cabal[Cabal]. Note that this is less reliable
64than either Stack or Nix and requires an installation of
65http://ghc.haskell.org[GHC].
66
67Check out the repository and run:
68
69[source,console]
70----
71cabal install
72----
73
74
75== Usage
76
77Copy link:config.example.dhall[`config.example.dhall`] to `config.dhall` and open it in a text editor.
78
79Execute the program without arguments to perform a backup:
80
81[source,console]
82----
83mulkup
84----
85
86A simple configuration file that defines a single stash might look
87like the following:
88
89[source,dhall]
90----
91let home = "/home/mulk" in
92
93{ host = "mulkinator"
94, stashes =
95 [ { name = "mulk.tar"
96 , baseDir = home
97
98 , tiers =
99 { hourly = { keep = 24 }
100 , daily = { keep = 7 }
101 , weekly = { keep = 4 }
102 , monthly = { keep = 12 }
103 }
104
105 , exclusions =
Matthias Andreas Benkardb0a5a5d2022-09-13 14:04:18 +0200106 [ "**/.stack-work"
Matthias Andreas Benkard152901b2022-09-13 06:17:25 +0200107 , "**/dist-newstyle"
108 , "${home}/.cabal/bin"
109 , "${home}/.cabal/packages"
110 , "${home}/.ghcup"
111 , "${home}/.stack"
112 , "${home}/Library/Caches"
113 ]
114 }
115 ]
116}
117----
118
119You can add as many stashes to the `stashes` list as you like.