2018-10-29

backup

tool with tarsnap support

features

  • directory with shell scripts or other executable files that generate newline separated lists of paths to backup
  • configuration files that set which scripts to call
  • backup to file with optional encryption and compression
  • backup to tarsnap

license

gpl3+

configuration

add executable scripts under .config/backup/ that emit newline separated filesystem paths when executed. for example with the use of find the files must have the executable bit set ("chmod +x {path}")

command-line interface

$ backup --help

parameters
  options ... sources destinations ...
description
  a backup archive creator
  sources are config file names and can be multiple names separated by a dot, for example "mail.system.documents"
  destinations are existing directory paths
options
  --combine  combine dot separated configuration names and create one backup file
  --dry-run
  --encrypt | -e
  --help | -h
  --interface
  --list-configs | -l  lists the recognised backup configurations
  --list-files  list files that would be included in the backup
  --show-config  display contents a configuration file
  --tarsnap | -t

dependencies

installation

part of sph-script

setup

  • download sph-script from releases or clone from git://git.sph.mn/sph-script
  • extract the downloaded archive
  • link or copy the "backup" script file into a directory which is in the environment variable $PATH. run "echo $PATH" to see what is currently in $PATH
  • test by running backup --help on the command-line

possible enhancements

  • source and target path presets. for example recognise media by uuid and execute backup copy on demand
  • list backup scripts and targets with ncurses, to be able to configure a list of possible source/target copy paths, and see when they ran the last time and see which current backups are possible and run them
  • display estimated space requirement