Skip to content

benkard/mulkup

Repository files navigation

Mulkup

A configurable bupstash wrapper.

1. Summary

Mulkup is a backup script that wraps bupstash.

Features:

  • Backup rotation (hourly, daily, weekly, monthly)

  • Multiple stashes

  • Exclusion lists

2. Installation

2.1. Using Stack

Outside of Nix, Stack is the easiest way to install Mulkup.

Check out the repository and run:

stack install

2.2. Using Nix

Mulkup is available as a Nix flake:

nix profile install github:benkard/mulkup

2.3. Using Cabal

It is possible to install Mulkup using Cabal. Note that this is less reliable than either Stack or Nix and requires an installation of GHC.

Check out the repository and run:

cabal install

3. Usage

Copy config.example.dhall to config.dhall and open it in a text editor. Edit it to suit your needs.

To configure the bupstash repository, key, and any other settings available in bupstash itself, set the corresponding environment variables. See the bupstash manual for details.

Execute the program without arguments to perform a backup:

mulkup

A simple configuration file that defines a single stash might look like the following:

let home = "/home/mulk" in

{ host = "mulkinator"
, stashes =
    [ { name = "mulk.tar"
      , baseDir = home

      , tiers =
          { hourly  = { keep = 24 }
          , daily   = { keep =  7 }
          , weekly  = { keep =  4 }
          , monthly = { keep = 12 }
          }

      , exclusions =
          [ "**/.stack-work"
          , "**/dist-newstyle"
          , "${home}/.cabal/bin"
          , "${home}/.cabal/packages"
          , "${home}/.ghcup"
          , "${home}/.stack"
          , "${home}/Library/Caches"
          ]
      }
    ]
}

You can add as many stashes to the stashes list as you like.

Releases

No releases published

Packages

No packages published