2005-11-17 11:33:49 +00:00
|
|
|
#!/bin/sh
|
2009-06-26 21:09:21 +00:00
|
|
|
#
|
2013-04-28 17:03:51 +00:00
|
|
|
# 2005-2013 Nico Schottelius (nico-ccollect at schottelius.org)
|
2019-05-01 12:38:35 +00:00
|
|
|
# 2016-2019 Darko Poljak (darko.poljak at gmail.com)
|
2009-06-26 21:09:21 +00:00
|
|
|
#
|
2008-03-07 22:03:55 +00:00
|
|
|
# This file is part of ccollect.
|
|
|
|
#
|
|
|
|
# ccollect is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2009-06-26 21:09:21 +00:00
|
|
|
#
|
2008-03-07 22:03:55 +00:00
|
|
|
# ccollect is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-06-26 21:09:21 +00:00
|
|
|
#
|
2008-03-07 22:03:55 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with ccollect. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
2007-08-14 12:33:22 +00:00
|
|
|
# Initially written for SyGroup (www.sygroup.ch)
|
2005-11-17 11:33:49 +00:00
|
|
|
# Date: Mon Nov 14 11:45:11 CET 2005
|
|
|
|
|
2009-06-15 02:19:30 +00:00
|
|
|
# Error upon expanding unset variables:
|
|
|
|
set -u
|
|
|
|
|
2008-06-13 09:28:43 +00:00
|
|
|
#
|
|
|
|
# Standard variables (stolen from cconf)
|
|
|
|
#
|
|
|
|
__pwd="$(pwd -P)"
|
|
|
|
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
|
|
|
|
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
|
|
|
|
|
2005-12-06 14:07:13 +00:00
|
|
|
#
|
2005-12-06 14:55:07 +00:00
|
|
|
# where to find our configuration and temporary file
|
2005-12-06 14:07:13 +00:00
|
|
|
#
|
2009-07-01 20:39:42 +00:00
|
|
|
CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}"
|
|
|
|
CSOURCES="${CCOLLECT_CONF}/sources"
|
|
|
|
CDEFAULTS="${CCOLLECT_CONF}/defaults"
|
2007-08-16 18:17:54 +00:00
|
|
|
CPREEXEC="${CDEFAULTS}/pre_exec"
|
|
|
|
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
2009-10-25 19:15:14 +00:00
|
|
|
CMARKER=".ccollect-marker"
|
2006-01-22 10:13:22 +00:00
|
|
|
|
2009-11-01 12:37:02 +00:00
|
|
|
export TMP="$(mktemp "/tmp/${__myname}.XXXXXX")"
|
2016-07-21 10:15:37 +00:00
|
|
|
CONTROL_PIPE="/tmp/${__myname}-control-pipe"
|
|
|
|
|
2019-05-01 12:38:35 +00:00
|
|
|
VERSION="2.5"
|
|
|
|
RELEASE="2019-05-01"
|
2007-08-16 18:17:54 +00:00
|
|
|
HALF_VERSION="ccollect ${VERSION}"
|
|
|
|
FULL_VERSION="ccollect ${VERSION} (${RELEASE})"
|
2006-04-29 21:46:29 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# CDATE: how we use it for naming of the archives
|
2007-08-14 13:26:20 +00:00
|
|
|
# DDATE: how the user should see it in our output (DISPLAY)
|
2006-04-29 21:46:29 +00:00
|
|
|
#
|
2007-08-16 18:17:54 +00:00
|
|
|
CDATE="date +%Y%m%d-%H%M"
|
2007-08-14 12:33:22 +00:00
|
|
|
DDATE="date +%Y-%m-%d-%H:%M:%S"
|
2009-07-28 15:16:13 +00:00
|
|
|
SDATE="date +%s"
|
2005-12-06 15:36:28 +00:00
|
|
|
|
2016-06-13 11:40:32 +00:00
|
|
|
#
|
|
|
|
# LOCKING: use flock if available, otherwise mkdir
|
|
|
|
# Locking is done for each source so that only one instance per source
|
|
|
|
# can run.
|
|
|
|
#
|
2016-07-21 10:15:37 +00:00
|
|
|
# Use CCOLLECT_CONF directory for lock files.
|
|
|
|
# This directory can be set arbitrary so it is writable for user
|
|
|
|
# executing ccollect.
|
|
|
|
LOCKDIR="${CCOLLECT_CONF}"
|
2016-06-13 11:40:32 +00:00
|
|
|
# printf pattern: ccollect_<source>.lock
|
|
|
|
LOCKFILE_PATTERN="ccollect_%s.lock"
|
|
|
|
LOCKFD=4
|
|
|
|
|
|
|
|
#
|
|
|
|
# locking functions using flock
|
|
|
|
#
|
|
|
|
lock_flock()
|
|
|
|
{
|
|
|
|
# $1 = source to backup
|
|
|
|
lockfile="${LOCKDIR}/$(printf "${LOCKFILE_PATTERN}" "$1")"
|
|
|
|
eval "exec ${LOCKFD}> ${lockfile}"
|
|
|
|
|
|
|
|
flock -n ${LOCKFD} && return 0 || return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
unlock_flock()
|
|
|
|
{
|
|
|
|
# $1 = source to backup
|
|
|
|
lockfile="${LOCKDIR}/$(printf "${LOCKFILE_PATTERN}" "$1")"
|
|
|
|
eval "exec ${LOCKFD}>&-"
|
|
|
|
rm -f "${lockfile}"
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# locking functions using mkdir (mkdir is atomic)
|
|
|
|
#
|
|
|
|
lock_mkdir()
|
|
|
|
{
|
|
|
|
# $1 = source to backup
|
|
|
|
lockfile="${LOCKDIR}/$(printf "${LOCKFILE_PATTERN}" "$1")"
|
|
|
|
|
|
|
|
mkdir "${lockfile}" && return 0 || return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
unlock_mkdir()
|
|
|
|
{
|
|
|
|
# $1 = source to backup
|
|
|
|
lockfile="${LOCKDIR}/$(printf "${LOCKFILE_PATTERN}" "$1")"
|
|
|
|
|
|
|
|
rmdir "${lockfile}"
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# determine locking tool: flock or mkdir
|
|
|
|
#
|
|
|
|
if $(which flock > /dev/null 2>&1)
|
|
|
|
then
|
|
|
|
lockf="lock_flock"
|
|
|
|
unlockf="unlock_flock"
|
|
|
|
else
|
|
|
|
lockf="lock_mkdir"
|
|
|
|
unlockf="unlock_mkdir"
|
|
|
|
fi
|
|
|
|
|
2006-01-09 12:24:27 +00:00
|
|
|
#
|
2009-07-01 10:03:40 +00:00
|
|
|
# unset values
|
2006-01-09 12:24:27 +00:00
|
|
|
#
|
|
|
|
PARALLEL=""
|
2016-07-21 10:15:37 +00:00
|
|
|
MAX_JOBS=""
|
2009-07-01 10:03:40 +00:00
|
|
|
USE_ALL=""
|
2017-02-23 19:04:53 +00:00
|
|
|
LOGFILE=""
|
|
|
|
SYSLOG=""
|
|
|
|
# e - only errors, a - all output
|
|
|
|
LOGLEVEL="a"
|
|
|
|
LOGONLYERRORS=""
|
2006-01-09 12:24:27 +00:00
|
|
|
|
2005-12-06 14:55:07 +00:00
|
|
|
#
|
|
|
|
# catch signals
|
|
|
|
#
|
2016-06-13 11:40:32 +00:00
|
|
|
TRAPFUNC="rm -f \"${TMP}\""
|
|
|
|
trap "${TRAPFUNC}" 1 2 15
|
2005-11-17 11:33:49 +00:00
|
|
|
|
2007-01-20 15:41:38 +00:00
|
|
|
#
|
|
|
|
# Functions
|
|
|
|
#
|
|
|
|
|
2017-02-23 19:04:53 +00:00
|
|
|
# check if we are running interactive or non-interactive
|
|
|
|
# see: http://www.tldp.org/LDP/abs/html/intandnonint.html
|
|
|
|
_is_interactive()
|
2007-08-14 13:26:20 +00:00
|
|
|
{
|
2017-02-23 19:04:53 +00:00
|
|
|
[ -t 0 -o -p /dev/stdin ]
|
2007-01-20 15:41:38 +00:00
|
|
|
}
|
|
|
|
|
2009-10-30 18:25:23 +00:00
|
|
|
#
|
|
|
|
# ssh-"feature": we cannot do '... read ...; ssh ...; < file',
|
|
|
|
# because ssh reads stdin! -n does not work -> does not ask for password
|
2010-04-09 19:05:40 +00:00
|
|
|
# Also allow deletion for files without the given suffix
|
2009-10-30 18:25:23 +00:00
|
|
|
#
|
2009-07-28 10:43:23 +00:00
|
|
|
delete_from_file()
|
|
|
|
{
|
2013-04-29 08:17:21 +00:00
|
|
|
file="$1"; shift
|
|
|
|
suffix="" # It will be set, if deleting incomplete backups.
|
|
|
|
[ $# -eq 1 ] && suffix="$1" && shift
|
2019-10-05 08:48:19 +00:00
|
|
|
# dirs for deletion will be moved to this trash dir inside destination dir
|
|
|
|
# - for fast mv operation
|
2019-10-17 04:52:51 +00:00
|
|
|
trash="$(mktemp -d ".trash.XXXXXX")"
|
2013-04-29 08:17:21 +00:00
|
|
|
while read to_remove; do
|
2019-10-05 08:48:19 +00:00
|
|
|
mv "${to_remove}" "${trash}" ||
|
|
|
|
_exit_err "Moving ${to_remove} to ${trash} failed."
|
2013-04-29 08:17:21 +00:00
|
|
|
set -- "$@" "${to_remove}"
|
|
|
|
if [ "${suffix}" ]; then
|
|
|
|
to_remove_no_suffix="$(echo ${to_remove} | sed "s/$suffix\$//")"
|
2019-10-05 08:48:19 +00:00
|
|
|
mv "${to_remove_no_suffix}" "${trash}" ||
|
|
|
|
_exit_err "Moving ${to_remove_no_suffix} to ${trash} failed."
|
2013-04-29 08:17:21 +00:00
|
|
|
set -- "$@" "${to_remove_no_suffix}"
|
|
|
|
fi
|
|
|
|
done < "${file}"
|
2019-10-05 08:48:19 +00:00
|
|
|
_techo "Removing $@ in ${trash}..."
|
2019-10-17 04:52:51 +00:00
|
|
|
empty_dir=".empty-dir"
|
2019-10-05 08:48:19 +00:00
|
|
|
mkdir "${empty_dir}" || _exit_err "Empty directory ${empty_dir} cannot be created."
|
2019-10-10 08:54:56 +00:00
|
|
|
[ "${VVERBOSE}" ] && echo "Starting: rsync -a --delete ${empty_dir} ${trash}"
|
2019-10-05 08:48:19 +00:00
|
|
|
# rsync needs ending slash for directory content
|
|
|
|
rsync -a --delete "${empty_dir}/" "${trash}/" || _exit_err "Removing $@ failed."
|
|
|
|
rmdir "${trash}" || _exit_err "Removing ${trash} directory failed"
|
|
|
|
rmdir "${empty_dir}" || _exit_err "Removing ${empty_dir} directory failed"
|
2019-10-16 13:50:54 +00:00
|
|
|
_techo "Removing $@ in ${trash} finished."
|
2009-07-28 10:43:23 +00:00
|
|
|
}
|
|
|
|
|
2007-08-17 22:14:10 +00:00
|
|
|
display_version()
|
|
|
|
{
|
2013-04-29 08:17:21 +00:00
|
|
|
echo "${FULL_VERSION}"
|
|
|
|
exit 0
|
2007-08-17 22:14:10 +00:00
|
|
|
}
|
|
|
|
|
2005-12-06 12:45:37 +00:00
|
|
|
usage()
|
|
|
|
{
|
2013-04-29 08:17:21 +00:00
|
|
|
cat << eof
|
2009-07-01 10:42:32 +00:00
|
|
|
${__myname}: [args] <interval name> <sources to backup>
|
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
ccollect creates (pseudo) incremental backups
|
2009-07-01 10:42:32 +00:00
|
|
|
|
2017-02-23 19:04:53 +00:00
|
|
|
-h, --help: Show this help screen
|
|
|
|
-a, --all: Backup all sources specified in ${CSOURCES}
|
|
|
|
-e, --errors: Log only errors
|
|
|
|
-j [max], --jobs [max] Specifies the number of jobs to run simultaneously.
|
|
|
|
If max is not specified then parallelise all jobs.
|
|
|
|
-l FILE, --logfile FILE Log to specified file
|
|
|
|
-p, --parallel: Parallelise backup processes (deprecated from 2.0)
|
|
|
|
-s, --syslog: Log to syslog with tag ccollect
|
|
|
|
-v, --verbose: Be very verbose (uses set -x)
|
|
|
|
-V, --version: Print version information
|
2009-07-01 10:42:32 +00:00
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
This is version ${VERSION} released on ${RELEASE}.
|
2009-07-01 10:42:32 +00:00
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
Retrieve latest ccollect at http://www.nico.schottelius.org/software/ccollect/
|
2009-07-01 10:42:32 +00:00
|
|
|
eof
|
2013-04-29 08:17:21 +00:00
|
|
|
exit 0
|
2005-12-06 12:45:37 +00:00
|
|
|
}
|
|
|
|
|
2016-06-13 11:40:32 +00:00
|
|
|
# locking functions
|
|
|
|
lock()
|
|
|
|
{
|
|
|
|
"${lockf}" "$@" || _exit_err \
|
|
|
|
"Only one instance of ${__myname} for source \"$1\" can run at one time."
|
|
|
|
}
|
|
|
|
|
|
|
|
unlock()
|
|
|
|
{
|
|
|
|
"${unlockf}" "$@"
|
|
|
|
}
|
|
|
|
|
2017-02-23 19:04:53 +00:00
|
|
|
# time displaying echo
|
|
|
|
# stdout version
|
|
|
|
_techo_stdout()
|
|
|
|
{
|
|
|
|
echo "$(${DDATE}): $@"
|
|
|
|
}
|
|
|
|
|
|
|
|
# syslog version
|
|
|
|
_techo_syslog()
|
|
|
|
{
|
|
|
|
logger -t ccollect "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
# specified file version
|
|
|
|
_techo_file()
|
|
|
|
{
|
|
|
|
_techo_stdout "$@" >> "${LOGFILE}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# determine _techo version before parsing options
|
|
|
|
if _is_interactive
|
|
|
|
then
|
|
|
|
_techof="_techo_stdout"
|
|
|
|
else
|
|
|
|
_techof="_techo_syslog"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# _techo with determined _techo version
|
|
|
|
_techo()
|
|
|
|
{
|
|
|
|
if [ "${LOGLEVEL}" = "a" ]
|
|
|
|
then
|
2018-09-23 09:42:09 +00:00
|
|
|
set -- ${name:+"[${name}]"} $@
|
|
|
|
"${_techof}" "$@"
|
2017-02-23 19:04:53 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
_techo_err()
|
|
|
|
{
|
|
|
|
_techo "Error: $@"
|
|
|
|
}
|
|
|
|
|
|
|
|
_exit_err()
|
|
|
|
{
|
|
|
|
_techo_err "$@"
|
|
|
|
rm -f "${TMP}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2005-12-07 16:41:20 +00:00
|
|
|
#
|
2009-07-01 10:03:40 +00:00
|
|
|
# Parse options
|
2005-12-07 16:41:20 +00:00
|
|
|
#
|
2009-07-01 10:03:40 +00:00
|
|
|
while [ "$#" -ge 1 ]; do
|
2013-04-29 08:17:21 +00:00
|
|
|
case "$1" in
|
|
|
|
-a|--all)
|
|
|
|
USE_ALL=1
|
|
|
|
;;
|
|
|
|
-p|--parallel)
|
2016-07-21 10:15:37 +00:00
|
|
|
_techo "Warning: -p, --parallel option is deprecated," \
|
|
|
|
"use -j, --jobs instead."
|
2013-04-29 08:17:21 +00:00
|
|
|
PARALLEL=1
|
2016-07-21 10:15:37 +00:00
|
|
|
MAX_JOBS=""
|
|
|
|
;;
|
|
|
|
-j|--jobs)
|
|
|
|
PARALLEL=1
|
|
|
|
if [ "$#" -ge 2 ]
|
|
|
|
then
|
|
|
|
case "$2" in
|
|
|
|
-*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
MAX_JOBS=$2
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2013-04-29 08:17:21 +00:00
|
|
|
;;
|
2017-02-23 19:04:53 +00:00
|
|
|
-e|--errors)
|
|
|
|
LOGONLYERRORS="1"
|
|
|
|
;;
|
|
|
|
-l|--logfile)
|
|
|
|
if [ "$#" -ge 2 ]
|
|
|
|
then
|
|
|
|
case "$2" in
|
|
|
|
-*)
|
|
|
|
_exit_err "Missing log file"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LOGFILE="$2"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
_exit_err "Missing log file"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
-s|--syslog)
|
|
|
|
SYSLOG="1"
|
|
|
|
;;
|
2013-04-29 08:17:21 +00:00
|
|
|
-v|--verbose)
|
|
|
|
set -x
|
|
|
|
;;
|
|
|
|
-V|--version)
|
|
|
|
display_version
|
|
|
|
;;
|
|
|
|
--)
|
|
|
|
# ignore the -- itself
|
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
-h|--help|-*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
2009-07-01 10:03:40 +00:00
|
|
|
done
|
2009-07-01 08:00:18 +00:00
|
|
|
|
2017-02-23 19:04:53 +00:00
|
|
|
# determine _techo version and logging level after parsing options
|
|
|
|
if [ "${LOGFILE}" ]
|
|
|
|
then
|
|
|
|
_techof="_techo_file"
|
|
|
|
LOGLEVEL="a"
|
|
|
|
elif _is_interactive
|
|
|
|
then
|
|
|
|
if [ "${SYSLOG}" ]
|
|
|
|
then
|
|
|
|
_techof="_techo_syslog"
|
|
|
|
LOGLEVEL="a"
|
|
|
|
else
|
|
|
|
_techof="_techo_stdout"
|
|
|
|
LOGLEVEL="e"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_techof="_techo_syslog"
|
|
|
|
LOGLEVEL="a"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${LOGFILE}" -o "${SYSLOG}" ]
|
|
|
|
then
|
|
|
|
if [ "${LOGONLYERRORS}" ]
|
|
|
|
then
|
|
|
|
LOGLEVEL="e"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-07-21 10:15:37 +00:00
|
|
|
# check that MAX_JOBS is natural number > 0
|
|
|
|
# empty string means run all in parallel
|
2016-08-08 13:56:19 +00:00
|
|
|
echo "${MAX_JOBS}" | grep -q -E '^[1-9][0-9]*$|^$'
|
2016-07-21 10:15:37 +00:00
|
|
|
if [ "$?" -ne 0 ]
|
|
|
|
then
|
|
|
|
_exit_err "Invalid max jobs value \"${MAX_JOBS}\""
|
|
|
|
fi
|
|
|
|
|
2009-07-23 15:46:04 +00:00
|
|
|
#
|
|
|
|
# Setup interval
|
|
|
|
#
|
|
|
|
if [ $# -ge 1 ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
export INTERVAL="$1"
|
|
|
|
shift
|
2009-07-23 15:46:04 +00:00
|
|
|
else
|
2013-04-29 08:17:21 +00:00
|
|
|
usage
|
2009-07-23 15:46:04 +00:00
|
|
|
fi
|
2005-12-06 15:36:28 +00:00
|
|
|
|
2005-12-08 11:18:44 +00:00
|
|
|
#
|
2009-07-24 06:58:48 +00:00
|
|
|
# Check for configuraton directory
|
2005-12-08 11:18:44 +00:00
|
|
|
#
|
2007-03-13 07:31:50 +00:00
|
|
|
[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \
|
2013-04-29 08:17:21 +00:00
|
|
|
"\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)"
|
2005-12-08 11:18:44 +00:00
|
|
|
|
2005-12-06 14:35:29 +00:00
|
|
|
#
|
2009-07-24 06:58:48 +00:00
|
|
|
# Create (portable!) source "array"
|
2005-12-06 14:35:29 +00:00
|
|
|
#
|
2009-07-24 06:58:48 +00:00
|
|
|
export no_sources=0
|
2006-10-25 12:48:48 +00:00
|
|
|
|
2009-07-23 15:47:54 +00:00
|
|
|
if [ "${USE_ALL}" = 1 ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# Get sources from source configuration
|
|
|
|
#
|
|
|
|
( cd "${CSOURCES}" && ls -1 > "${TMP}" ) || \
|
|
|
|
_exit_err "Listing of sources failed. Aborting."
|
|
|
|
|
|
|
|
while read tmp; do
|
|
|
|
eval export source_${no_sources}=\"${tmp}\"
|
|
|
|
no_sources=$((${no_sources}+1))
|
|
|
|
done < "${TMP}"
|
2009-07-23 15:47:54 +00:00
|
|
|
else
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# Get sources from command line
|
|
|
|
#
|
|
|
|
while [ "$#" -ge 1 ]; do
|
|
|
|
eval arg=\"\$1\"; shift
|
|
|
|
|
|
|
|
eval export source_${no_sources}=\"${arg}\"
|
|
|
|
no_sources="$((${no_sources}+1))"
|
|
|
|
done
|
2005-12-06 14:35:29 +00:00
|
|
|
fi
|
|
|
|
|
2007-08-14 13:26:20 +00:00
|
|
|
#
|
|
|
|
# Need at least ONE source to backup
|
|
|
|
#
|
2009-07-24 06:58:48 +00:00
|
|
|
if [ "${no_sources}" -lt 1 ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
usage
|
2007-08-14 13:26:20 +00:00
|
|
|
else
|
2013-04-29 08:17:21 +00:00
|
|
|
_techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}"
|
2007-08-14 13:26:20 +00:00
|
|
|
fi
|
|
|
|
|
2007-08-14 12:41:36 +00:00
|
|
|
#
|
|
|
|
# Look for pre-exec command (general)
|
|
|
|
#
|
|
|
|
if [ -x "${CPREEXEC}" ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
_techo "Executing ${CPREEXEC} ..."
|
|
|
|
"${CPREEXEC}"; ret=$?
|
|
|
|
_techo "Finished ${CPREEXEC} (return code: ${ret})."
|
2007-08-14 12:41:36 +00:00
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
[ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting"
|
2007-08-14 12:41:36 +00:00
|
|
|
fi
|
|
|
|
|
2009-10-25 14:40:37 +00:00
|
|
|
################################################################################
|
2005-12-06 15:20:43 +00:00
|
|
|
#
|
2009-10-25 14:40:37 +00:00
|
|
|
# Let's do the backup - here begins the real stuff
|
2005-12-06 15:20:43 +00:00
|
|
|
#
|
2016-07-21 10:15:37 +00:00
|
|
|
|
|
|
|
# in PARALLEL mode:
|
|
|
|
# * create control pipe
|
|
|
|
# * determine number of jobs to start at once
|
|
|
|
if [ "${PARALLEL}" ]; then
|
|
|
|
mkfifo "${CONTROL_PIPE}"
|
|
|
|
# fd 5 is tied to control pipe
|
|
|
|
eval "exec 5<>${CONTROL_PIPE}"
|
|
|
|
TRAPFUNC="${TRAPFUNC}; rm -f \"${CONTROL_PIPE}\""
|
|
|
|
trap "${TRAPFUNC}" 0 1 2 15
|
|
|
|
|
|
|
|
# determine how much parallel jobs to prestart
|
2018-01-30 08:48:43 +00:00
|
|
|
if [ "${MAX_JOBS}" ]
|
2016-07-21 10:15:37 +00:00
|
|
|
then
|
2018-01-30 08:48:43 +00:00
|
|
|
if [ "${MAX_JOBS}" -le "${no_sources}" ]
|
|
|
|
then
|
|
|
|
prestart="${MAX_JOBS}"
|
|
|
|
else
|
|
|
|
prestart="${no_sources}"
|
|
|
|
fi
|
2016-07-21 10:15:37 +00:00
|
|
|
else
|
|
|
|
prestart=0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-11-01 14:07:50 +00:00
|
|
|
source_no=0
|
|
|
|
while [ "${source_no}" -lt "${no_sources}" ]; do
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# Get current source
|
|
|
|
#
|
|
|
|
eval export name=\"\$source_${source_no}\"
|
|
|
|
source_no=$((${source_no}+1))
|
2006-01-13 16:07:20 +00:00
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# Start ourself, if we want parallel execution
|
|
|
|
#
|
|
|
|
if [ "${PARALLEL}" ]; then
|
2016-07-21 10:15:37 +00:00
|
|
|
if [ ! "${MAX_JOBS}" ]
|
|
|
|
then
|
|
|
|
# run all in parallel
|
|
|
|
"$0" "${INTERVAL}" "${name}" &
|
|
|
|
continue
|
|
|
|
elif [ "${prestart}" -gt 0 ]
|
|
|
|
then
|
|
|
|
# run prestart child if pending
|
|
|
|
{ "$0" "${INTERVAL}" "${name}"; printf '\n' >&5; } &
|
|
|
|
prestart=$((${prestart} - 1))
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
# each time a child finishes we get a line from the pipe
|
|
|
|
# and then launch another child
|
|
|
|
while read line
|
|
|
|
do
|
|
|
|
{ "$0" "${INTERVAL}" "${name}"; printf '\n' >&5; } &
|
|
|
|
# get out of loop so we can contnue with main loop
|
|
|
|
# for next source
|
|
|
|
break
|
|
|
|
done <&5
|
|
|
|
continue
|
|
|
|
fi
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
2006-01-13 15:37:22 +00:00
|
|
|
|
2006-01-13 16:07:20 +00:00
|
|
|
#
|
|
|
|
# Start subshell for easy log editing
|
|
|
|
#
|
|
|
|
(
|
2013-04-29 08:17:21 +00:00
|
|
|
backup="${CSOURCES}/${name}"
|
|
|
|
c_source="${backup}/source"
|
|
|
|
c_dest="${backup}/destination"
|
|
|
|
c_pre_exec="${backup}/pre_exec"
|
|
|
|
c_post_exec="${backup}/post_exec"
|
|
|
|
|
|
|
|
#
|
|
|
|
# Stderr to stdout, so we can produce nice logs
|
|
|
|
#
|
|
|
|
exec 2>&1
|
|
|
|
|
|
|
|
#
|
|
|
|
# Record start of backup: internal and for the user
|
|
|
|
#
|
|
|
|
begin_s="$(${SDATE})"
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Beginning to backup"
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Standard configuration checks
|
|
|
|
#
|
|
|
|
if [ ! -e "${backup}" ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Source \"${backup}\" does not exist."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Configuration _must_ be a directory (cconfig style)
|
|
|
|
#
|
|
|
|
if [ ! -d "${backup}" ]; then
|
|
|
|
_exit_err "\"${backup}\" is not a cconfig-directory. Skipping."
|
|
|
|
fi
|
|
|
|
|
2016-06-13 11:40:32 +00:00
|
|
|
#
|
|
|
|
# Acquire lock for source. If lock cannot be acquired, lock will exit
|
|
|
|
# with error message.
|
|
|
|
#
|
|
|
|
lock "${name}"
|
|
|
|
|
|
|
|
# redefine trap to also unlock (rm lockfile)
|
2016-07-21 10:15:37 +00:00
|
|
|
TRAPFUNC="${TRAPFUNC}; unlock \"${name}\""
|
2016-06-13 11:40:32 +00:00
|
|
|
trap "${TRAPFUNC}" 1 2 15
|
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# First execute pre_exec, which may generate destination or other parameters
|
|
|
|
#
|
|
|
|
if [ -x "${c_pre_exec}" ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Executing ${c_pre_exec} ..."
|
2013-04-29 08:17:21 +00:00
|
|
|
"${c_pre_exec}"; ret="$?"
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Finished ${c_pre_exec} (return code ${ret})."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
2018-09-20 14:08:00 +00:00
|
|
|
[ "${ret}" -eq 0 ] || _exit_err "${c_pre_exec} failed. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Read source configuration
|
|
|
|
#
|
|
|
|
for opt in verbose very_verbose summary exclude rsync_options \
|
|
|
|
delete_incomplete rsync_failure_codes \
|
|
|
|
mtime quiet_if_down ; do
|
|
|
|
if [ -f "${backup}/${opt}" -o -f "${backup}/no_${opt}" ]; then
|
|
|
|
eval c_$opt=\"${backup}/$opt\"
|
|
|
|
else
|
|
|
|
eval c_$opt=\"${CDEFAULTS}/$opt\"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
#
|
|
|
|
# Interval definition: First try source specific, fallback to default
|
|
|
|
#
|
|
|
|
c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)"
|
|
|
|
|
|
|
|
if [ -z "${c_interval}" ]; then
|
|
|
|
c_interval="$(cat "${CDEFAULTS}/intervals/${INTERVAL}" 2>/dev/null)"
|
|
|
|
|
|
|
|
if [ -z "${c_interval}" ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "No definition for interval \"${INTERVAL}\" found. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Sort by ctime (default) or mtime (configuration option)
|
|
|
|
#
|
|
|
|
if [ -f "${c_mtime}" ] ; then
|
|
|
|
TSORT="t"
|
|
|
|
else
|
|
|
|
TSORT="tc"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Source configuration checks
|
|
|
|
#
|
|
|
|
if [ ! -f "${c_source}" ]; then
|
|
|
|
_exit_err "Source description \"${c_source}\" is not a file. Skipping."
|
|
|
|
else
|
|
|
|
source=$(cat "${c_source}"); ret="$?"
|
|
|
|
if [ "${ret}" -ne 0 ]; then
|
|
|
|
_exit_err "Source ${c_source} is not readable. Skipping."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Destination is a path
|
|
|
|
#
|
|
|
|
if [ ! -f "${c_dest}" ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Destination ${c_dest} is not a file. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
else
|
|
|
|
ddir="$(cat "${c_dest}")"; ret="$?"
|
|
|
|
if [ "${ret}" -ne 0 ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Destination ${c_dest} is not readable. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Parameters: ccollect defaults, configuration options, user options
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Rsync standard options (archive will be added after is-up-check)
|
|
|
|
#
|
|
|
|
set -- "$@" "--delete" "--numeric-ids" "--relative" \
|
|
|
|
"--delete-excluded" "--sparse"
|
|
|
|
|
|
|
|
#
|
|
|
|
# Exclude list
|
|
|
|
#
|
|
|
|
if [ -f "${c_exclude}" ]; then
|
|
|
|
set -- "$@" "--exclude-from=${c_exclude}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Output a summary
|
|
|
|
#
|
|
|
|
if [ -f "${c_summary}" ]; then
|
|
|
|
set -- "$@" "--stats"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verbosity for rsync, rm, and mkdir
|
|
|
|
#
|
|
|
|
VVERBOSE=""
|
|
|
|
if [ -f "${c_very_verbose}" ]; then
|
|
|
|
set -- "$@" "-vv"
|
|
|
|
VVERBOSE="-v"
|
|
|
|
elif [ -f "${c_verbose}" ]; then
|
|
|
|
set -- "$@" "-v"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Extra options for rsync provided by the user
|
|
|
|
#
|
|
|
|
if [ -f "${c_rsync_options}" ]; then
|
|
|
|
while read line; do
|
2017-09-03 18:00:54 +00:00
|
|
|
# Trim line.
|
|
|
|
ln=$(echo "${line}" | awk '{$1=$1;print;}')
|
|
|
|
# Only if ln is non zero length string.
|
|
|
|
#
|
|
|
|
# If ln is empty then rsync '' DEST evaluates
|
|
|
|
# to transfer current directory to DEST which would
|
|
|
|
# with specific options destroy DEST content.
|
|
|
|
if [ -n "${ln}" ]
|
|
|
|
then
|
|
|
|
set -- "$@" "${ln}"
|
|
|
|
fi
|
2013-04-29 08:17:21 +00:00
|
|
|
done < "${c_rsync_options}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check: source is up and accepting connections (before deleting old backups!)
|
|
|
|
#
|
|
|
|
if ! rsync "$@" "${source}" >/dev/null 2>"${TMP}" ; then
|
|
|
|
if [ ! -f "${c_quiet_if_down}" ]; then
|
|
|
|
cat "${TMP}"
|
|
|
|
fi
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Source ${source} is not readable. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Add --archive for real backup (looks nice in front)
|
|
|
|
#
|
|
|
|
set -- "--archive" "$@"
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check: destination exists?
|
|
|
|
#
|
2018-09-20 14:08:00 +00:00
|
|
|
cd "${ddir}" || _exit_err "Cannot change to ${ddir}. Skipping."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check incomplete backups (needs echo to remove newlines)
|
|
|
|
#
|
|
|
|
ls -1 | grep "${CMARKER}\$" > "${TMP}"; ret=$?
|
|
|
|
|
|
|
|
if [ "$ret" -eq 0 ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Incomplete backups: $(echo $(cat "${TMP}"))"
|
2013-04-29 08:17:21 +00:00
|
|
|
if [ -f "${c_delete_incomplete}" ]; then
|
2019-10-16 12:03:13 +00:00
|
|
|
delete_from_file "${TMP}" "${CMARKER}" &
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-10-17 05:42:31 +00:00
|
|
|
#
|
|
|
|
# Include current time in name, not the time when we began to remove above
|
|
|
|
#
|
|
|
|
export destination_name="${INTERVAL}.$(${CDATE}).$$-${source_no}"
|
|
|
|
export destination_dir="${ddir}/${destination_name}"
|
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
#
|
|
|
|
# Check: maximum number of backups is reached?
|
|
|
|
#
|
|
|
|
count="$(ls -1 | grep -c "^${INTERVAL}\\.")"
|
|
|
|
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
if [ "${count}" -ge "${c_interval}" ]; then
|
2019-10-17 05:42:31 +00:00
|
|
|
# Use oldest directory as new backup destination directory.
|
|
|
|
# It need not to be deleted, rsync will sync its content.
|
|
|
|
oldest_bak=$(ls -${TSORT}1r | grep "^${INTERVAL}\\." | head -n 1 || \
|
|
|
|
_exit_err "Listing oldest backup failed")
|
|
|
|
_techo "Using ${oldest_bak} for destination dir"
|
|
|
|
mv "${oldest_bak}" "${destination_dir}" ||
|
|
|
|
_exit_err "Moving oldest backup ${oldest_bak} to ${destination_dir} failed."
|
|
|
|
# Touch dest dir so it is not sorted wrong in listings below.
|
|
|
|
touch "${destination_dir}"
|
|
|
|
|
|
|
|
# We have something to remove only if count > interval.
|
|
|
|
if [ "${count}" -gt "${c_interval}" ]; then
|
|
|
|
remove="$((${count} - ${c_interval}))"
|
|
|
|
_techo "Removing ${remove} backup(s)..."
|
|
|
|
|
|
|
|
ls -${TSORT}1r | grep "^${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \
|
|
|
|
_exit_err "Listing old backups failed"
|
|
|
|
|
|
|
|
delete_from_file "${TMP}" &
|
|
|
|
fi
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check for backup directory to clone from: Always clone from the latest one!
|
|
|
|
#
|
|
|
|
last_dir="$(ls -${TSORT}p1 | grep '/$' | head -n 1)" || \
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Failed to list contents of ${ddir}."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Clone from old backup, if existing
|
|
|
|
#
|
|
|
|
if [ "${last_dir}" ]; then
|
|
|
|
set -- "$@" "--link-dest=${ddir}/${last_dir}"
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Hard linking from ${last_dir}"
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Mark backup running and go back to original directory
|
|
|
|
#
|
|
|
|
touch "${destination_dir}${CMARKER}"
|
2018-09-20 14:08:00 +00:00
|
|
|
cd "${__abs_mydir}" || _exit_err "Cannot go back to ${__abs_mydir}."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# the rsync part
|
|
|
|
#
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Transferring files..."
|
2013-04-29 08:17:21 +00:00
|
|
|
rsync "$@" "${source}" "${destination_dir}"; ret=$?
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Finished backup (rsync return code: $ret)."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Set modification time (mtime) to current time, if sorting by mtime is enabled
|
|
|
|
#
|
|
|
|
[ -f "$c_mtime" ] && touch "${destination_dir}"
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check if rsync exit code indicates failure.
|
|
|
|
#
|
|
|
|
fail=""
|
|
|
|
if [ -f "$c_rsync_failure_codes" ]; then
|
|
|
|
while read code ; do
|
|
|
|
if [ "$ret" = "$code" ]; then
|
|
|
|
fail=1
|
|
|
|
fi
|
|
|
|
done <"${c_rsync_failure_codes}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Remove marking here unless rsync failed.
|
|
|
|
#
|
|
|
|
if [ -z "$fail" ]; then
|
|
|
|
rm "${destination_dir}${CMARKER}" || \
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "Removing ${destination_dir}${CMARKER} failed."
|
2013-04-29 08:17:21 +00:00
|
|
|
if [ "${ret}" -ne 0 ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
else
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Warning: rsync failed with return code $ret."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# post_exec
|
|
|
|
#
|
|
|
|
if [ -x "${c_post_exec}" ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Executing ${c_post_exec} ..."
|
2013-04-29 08:17:21 +00:00
|
|
|
"${c_post_exec}"; ret=$?
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Finished ${c_post_exec}."
|
2013-04-29 08:17:21 +00:00
|
|
|
|
|
|
|
if [ "${ret}" -ne 0 ]; then
|
2018-09-20 14:08:00 +00:00
|
|
|
_exit_err "${c_post_exec} failed."
|
2013-04-29 08:17:21 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Time calculation
|
|
|
|
#
|
|
|
|
end_s="$(${SDATE})"
|
|
|
|
full_seconds="$((${end_s} - ${begin_s}))"
|
|
|
|
hours="$((${full_seconds} / 3600))"
|
|
|
|
minutes="$(((${full_seconds} % 3600) / 60))"
|
|
|
|
seconds="$((${full_seconds} % 60))"
|
|
|
|
|
2018-09-20 14:08:00 +00:00
|
|
|
_techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)"
|
2016-07-21 10:15:37 +00:00
|
|
|
|
|
|
|
unlock "${name}"
|
2019-10-16 12:03:13 +00:00
|
|
|
|
|
|
|
# wait for children (doing delete_from_file) if any still running
|
|
|
|
wait
|
2019-04-26 12:03:01 +00:00
|
|
|
) || exit
|
2005-11-17 15:52:44 +00:00
|
|
|
done
|
2005-12-06 14:55:07 +00:00
|
|
|
|
2005-12-06 16:08:38 +00:00
|
|
|
#
|
|
|
|
# Be a good parent and wait for our children, if they are running wild parallel
|
2016-07-21 10:15:37 +00:00
|
|
|
# After all children are finished then remove control pipe.
|
2005-12-06 16:08:38 +00:00
|
|
|
#
|
2007-08-16 18:08:23 +00:00
|
|
|
if [ "${PARALLEL}" ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
_techo "Waiting for children to complete..."
|
|
|
|
wait
|
2016-07-21 10:15:37 +00:00
|
|
|
rm -f "${CONTROL_PIPE}"
|
2005-12-06 16:08:38 +00:00
|
|
|
fi
|
|
|
|
|
2006-01-22 10:13:22 +00:00
|
|
|
#
|
|
|
|
# Look for post-exec command (general)
|
|
|
|
#
|
2007-08-16 18:08:23 +00:00
|
|
|
if [ -x "${CPOSTEXEC}" ]; then
|
2013-04-29 08:17:21 +00:00
|
|
|
_techo "Executing ${CPOSTEXEC} ..."
|
|
|
|
"${CPOSTEXEC}"; ret=$?
|
|
|
|
_techo "Finished ${CPOSTEXEC} (return code: ${ret})."
|
2006-10-25 12:48:48 +00:00
|
|
|
|
2013-04-29 08:17:21 +00:00
|
|
|
if [ "${ret}" -ne 0 ]; then
|
|
|
|
_techo "${CPOSTEXEC} failed."
|
|
|
|
fi
|
2006-01-22 10:13:22 +00:00
|
|
|
fi
|
|
|
|
|
2007-08-16 18:08:23 +00:00
|
|
|
rm -f "${TMP}"
|
2009-07-01 10:03:40 +00:00
|
|
|
_techo "Finished"
|