diff options
author | Alan Aversa <aversa@email.arizona.edu> | 2016-07-27 20:48:52 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-07-30 06:03:58 +0700 |
commit | 2f984002ad50aff0a81ea50ae7e1d4031d8d004f (patch) | |
tree | 1799a46a46c0751c959d537cee5fb57f8ff042a4 /system/btrbk | |
parent | 785233d071ef477cf96d27fb2ec8c9baec0e19b1 (diff) | |
download | slackbuilds-2f984002ad50aff0a81ea50ae7e1d4031d8d004f.tar.gz |
system/btrbk: Added (backup tool for btrfs subvolumes).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/btrbk')
-rw-r--r-- | system/btrbk/README | 24 | ||||
-rw-r--r-- | system/btrbk/btrbk.SlackBuild | 91 | ||||
-rw-r--r-- | system/btrbk/btrbk.info | 10 | ||||
-rw-r--r-- | system/btrbk/slack-desc | 19 |
4 files changed, 144 insertions, 0 deletions
diff --git a/system/btrbk/README b/system/btrbk/README new file mode 100644 index 0000000000..6c9a269c3c --- /dev/null +++ b/system/btrbk/README @@ -0,0 +1,24 @@ +btrbk is a backup tool for btrfs subvolumes, taking advantage of btrfs specific capabilities +to create atomic snapshots and transfer them incrementally to your backup locations. + +The source and target locations are specified in a config file, which allows to easily configure +simple scenarios like "laptop with locally attached backup disks", as well as more complex ones, +e.g. "server receiving backups from several hosts via ssh, with different retention policy". + +Key Features: + +* Atomic snapshots +* Incremental backups +* Configurable retention policy +* Backups to multiple destinations +* Transfer via ssh +* Resume of backups (if backup target was not reachable for a while) +* Encrypted backups to non-btrfs destinations +* Wildcard subvolumes (useful for docker and lxc containers) +* Transaction log +* Comprehensive list and statistics output +* Resolve and trace btrfs parent-child and received-from relationships +* Display file changes between two backups + +btrbk is designed to run as a cron job for triggering periodic snapshots and backups, as well +as from the command line (e.g. for instantly creating additional snapshots). diff --git a/system/btrbk/btrbk.SlackBuild b/system/btrbk/btrbk.SlackBuild new file mode 100644 index 0000000000..1049adab31 --- /dev/null +++ b/system/btrbk/btrbk.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for btrbk + +# Copyright 2016 Alan Aversa +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=btrbk +VERSION=${VERSION:-0.23.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG="$TMP"/package-"$PRGNAM" +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mv $PKG/usr/share/man $PKG/usr +mv $PKG/usr/share/doc/btrbk/* $PKG/usr/doc/$PRGNAM-$VERSION/ +rm -rf $PKG/usr/share + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Remove systemd junk (Slackware doesn't use systemd, thank God!) +rm -fr $PKG/usr/lib/ + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/btrbk/btrbk.info b/system/btrbk/btrbk.info new file mode 100644 index 0000000000..7bf5bf63e4 --- /dev/null +++ b/system/btrbk/btrbk.info @@ -0,0 +1,10 @@ +PRGNAM="btrbk" +VERSION="0.23.3" +HOMEPAGE="https://digint.ch/btrbk/" +DOWNLOAD="https://digint.ch/download/btrbk/releases/btrbk-0.23.3.tar.xz" +MD5SUM="66ba390efd0db3e55db4bd12ee7876fb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Alan Aversa" +EMAIL="aveNOrsa@email.ariSPAMzona.edu (remove NO and SPAM)" diff --git a/system/btrbk/slack-desc b/system/btrbk/slack-desc new file mode 100644 index 0000000000..8d60f96053 --- /dev/null +++ b/system/btrbk/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +btrbk: btrbk (backup tool for btrfs subvolumes) +btrbk: +btrbk: btrbk is a backup tool for btrfs subvolumes, taking advantage of btrfs +btrbk: specific capabilities to create atomic snapshots and transfer them +btrbk: incrementally to your backup locations. +btrbk: +btrbk: The source and target locations are specified in a config file, which +btrbk: allows to easily configure simple scenarios like "laptop with locally +btrbk: attached backup disks", as well as more complex ones, e.g. "server +btrbk: receiving backups from several hosts via ssh, with different retention +btrbk: policy". |