--- /dev/null
+#
+# Bacula® - The Network Backup Solution
+#
+# Copyright (C) 2007-2017 Bacula Systems SA
+# All rights reserved.
+#
+# The main author of Bacula is Kern Sibbald, with contributions from many
+# others, a complete list can be found in the file AUTHORS.
+#
+# Licensees holding a valid Bacula Systems SA license may use this file
+# and others of this release in accordance with the proprietary license
+# agreement provided in the LICENSE file. Redistribution of any part of
+# this release is not permitted.
+#
+# Bacula® is a registered trademark of Kern Sibbald.
+#
+#
+# Copyright (c) 2019 by Inteos sp. z o.o.
+# All rights reserved. IP transfered to Bacula Systems according to agreement.
+#
+# This is a Bacula container for backup/restore Docker volumes using archive tools.
+# Author: Radosław Korzeniewski, radekk@inteos.pl, Inteos Sp. z o.o.
+#
+FROM busybox:latest
+LABEL maintainer="Radosław Korzeniewski <radekk@inteos.pl>"
+LABEL org.label-schema.schema-version="1.0"
+LABEL org.label-schema.description="This is a Bacula container for backup/restore Docker volumes using archive tools."
+LABEL org.label-schema.vendor="Bacula Systems S.A."
+LABEL org.label-schema.version="1.2"
+COPY baculatar /baculatar
+COPY tar /tar
+CMD ["/baculatar", "backup"]
+ENTRYPOINT ["/baculatar"]
--- /dev/null
+The Docker Plugin uses a static version of tar to backup/restore
+Docker external volumes.
+
+To doing so it needs
+ - a full C building toolchain
+ - the upx executable compression library
+
+A full Internet access for downloading required source code and dependencies.
+
+You should provide them for a successful build.
--- /dev/null
+#!/bin/sh
+#
+# Bacula(R) - The Network Backup Solution
+#
+# Copyright (C) 2000-2020 Kern Sibbald
+#
+# The original author of Bacula is Kern Sibbald, with contributions
+# from many others, a complete list can be found in the file AUTHORS.
+#
+# You may use this file and others of this release according to the
+# license defined in the LICENSE file, which includes the Affero General
+# Public License, v3.0 ("AGPLv3") and some additional permissions and
+# terms pursuant to its AGPLv3 Section 7.
+#
+# This notice must be preserved when any source code is
+# conveyed and/or propagated.
+#
+# Bacula(R) is a registered trademark of Kern Sibbald.
+#
+# This is a Bacula archive tool for backup/restore files on Docker volumes.
+# Author: Radosław Korzeniewski, radekk@inteos.pl, Inteos Sp. z o.o.
+#
+#echo "EXEC:" $0
+#echo "ARGV:" $*
+
+if [ "x$0" == "x$1" ]
+then
+ shift 1
+fi
+ARGV="backup"
+if [ "x$1" != "x" ]
+then
+ ARGV=$1
+fi
+#echo "params:" $ARGV
+if [ $ARGV == "gimmetheshell" ]
+then
+ exec /bin/sh
+fi
+
+rm -f /logs/docker.err /logs/docker.log
+RC=0
+
+# this is an ack to plugin to confirm proper execution
+echo "200:OK"
+
+case $ARGV in
+ "backup")
+ /tar -cvvf /logs/fout -C /backup . 2> /logs/docker.err > /logs/docker.log
+ RC=$?
+ ;;
+ "restore")
+ /tar -xvvf /logs/fin -C /restore 2> /logs/docker.err > /logs/docker.log
+ RC=$?
+ ;;
+ "*")
+ echo "404:Invalid option!" > /logs/docker.err
+esac
+if [ $RC -ne 0 ]
+then
+ echo "500:exit status: $RC" >> /logs/docker.err
+fi
+exit 0
--- /dev/null
+#!/bin/sh
+#
+# Bacula(R) - The Network Backup Solution
+#
+# Copyright (C) 2000-2020 Kern Sibbald
+#
+# The original author of Bacula is Kern Sibbald, with contributions
+# from many others, a complete list can be found in the file AUTHORS.
+#
+# You may use this file and others of this release according to the
+# license defined in the LICENSE file, which includes the Affero General
+# Public License, v3.0 ("AGPLv3") and some additional permissions and
+# terms pursuant to its AGPLv3 Section 7.
+#
+# This notice must be preserved when any source code is
+# conveyed and/or propagated.
+#
+# Bacula(R) is a registered trademark of Kern Sibbald.
+#
+# This is a Bacula archive tool for backup/restore files on Docker volumes.
+# Author: Radosław Korzeniewski, radekk@inteos.pl, Inteos Sp. z o.o.
+#
+echo "This script will build a custom static BaculaTar archive!"
+echo
+echo "To doing so it needs a full C building toolchain, upx executable compression library"
+echo "and full Internet access for downloading required source code and dependencies."
+echo "You should provide it for successful build."
+echo
+echo "When ready - hit enter -"
+if [ "x$1" != "xyes" ]
+then
+ read a
+fi
+rm -rf archbuild
+git clone https://github.com/ebl/tar-static.git archbuild
+cd archbuild
+./build.sh
+cd ..
+cp archbuild/releases/tar .
+rm -rf archbuild
+#D=`date +%d%b%y`
+D=`grep DOCKER_TAR_IMAGE ../../../../version.h | awk '{print $3}' | sed 's/"//g'`
+docker build -t baculatar:$D .
+docker tag baculatar:$D baculatar:latest
+docker save -o baculatar-$D.docker.tar baculatar:latest