tachtler:dovecot_backup_-_skript
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
tachtler:dovecot_backup_-_skript [2018/11/25 07:21] – [Dovecot Backup - Skript] klaus | tachtler:dovecot_backup_-_skript [2019/10/16 14:51] – [Skript] klaus | ||
---|---|---|---|
Zeile 12: | Zeile 12: | ||
^ Beschreibung | ^ Beschreibung | ||
- | | Linux-Magazin | [[http:// | + | | Linux-Magazin | [[http:// |
| Homepage | | Homepage | ||
| Dokumentation | [[http:// | | Dokumentation | [[http:// | ||
Zeile 27: | Zeile 27: | ||
Nachfolgendes Skript ermöglicht die Erstellung einer ***.tar.gz**-Datei | Nachfolgendes Skript ermöglicht die Erstellung einer ***.tar.gz**-Datei | ||
* von **__allen__** Benutzerkonten | * von **__allen__** Benutzerkonten | ||
+ | * **__oder__** über **__eine Datei mit E-Mail-Adressen__**, | ||
* pro **__Benutzer eine eigene *.tar.gz-Datei__** | * pro **__Benutzer eine eigene *.tar.gz-Datei__** | ||
* auf **__Dateiebene__** | * auf **__Dateiebene__** | ||
Zeile 45: | Zeile 46: | ||
# CUSTOM - Backup-Files. | # CUSTOM - Backup-Files. | ||
- | DIR_BACKUP=' | + | DIR_BACKUP=' |
FILE_BACKUP=dovecot_backup_`date ' | FILE_BACKUP=dovecot_backup_`date ' | ||
FILE_DELETE=' | FILE_DELETE=' | ||
- | BACKUPFILES_DELETE=7 | + | BACKUPFILES_DELETE=14 |
# CUSTOM - dovecot Folders. | # CUSTOM - dovecot Folders. | ||
Zeile 55: | Zeile 56: | ||
MAILDIR_USER=' | MAILDIR_USER=' | ||
MAILDIR_GROUP=' | MAILDIR_GROUP=' | ||
+ | |||
+ | # CUSTOM - Path and file name of a file with e-mail addresses to backup, if | ||
+ | # SET. If NOT, the script will determine all mailboxes by default. | ||
+ | # FILE_USERLIST='/ | ||
+ | # - OR - | ||
+ | # FILE_USERLIST='' | ||
+ | FILE_USERLIST='' | ||
+ | |||
+ | # CUSTOM - Check when FILE_USERLIST was used, if the user per line was a | ||
+ | # valid e-mail address [Y|N]. | ||
+ | FILE_USERLIST_VALIDATE_EMAIL=' | ||
# CUSTOM - Mail-Recipient. | # CUSTOM - Mail-Recipient. | ||
Zeile 70: | Zeile 82: | ||
^ Parametername | ^ Parametername | ||
| '' | | '' | ||
- | | '' | + | | '' |
| '' | | '' | ||
| '' | | '' | ||
Zeile 78: | Zeile 90: | ||
| '' | | '' | ||
| '' | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
==== / | ==== / | ||
Zeile 110: | Zeile 126: | ||
# will be send by e-mail. | # will be send by e-mail. | ||
# # | # # | ||
- | # Last update : 03.10.2018 # | + | # Last update : 08.10.2019 # |
- | # Version | + | # Version |
# # | # # | ||
# Author | # Author | ||
Zeile 124: | Zeile 140: | ||
# +----------------------------------------------------------------------+ | # +----------------------------------------------------------------------+ | ||
# # | # # | ||
- | # Copyright (c) 2018 by Klaus Tachtler. | + | # Copyright (c) 2019 by Klaus Tachtler. |
# # | # # | ||
############################################################################## | ############################################################################## | ||
Zeile 168: | Zeile 184: | ||
# | # | ||
# | # | ||
- | # | + | # |
# -------------------------------------------------------------------------- # | # -------------------------------------------------------------------------- # | ||
# Version | # Version | ||
Zeile 175: | Zeile 191: | ||
# with FreeBSD. | # with FreeBSD. | ||
# | # | ||
+ | # -------------------------------------------------------------------------- # | ||
+ | # Version | ||
+ | # Description : GitHub Issue #9 # | ||
+ | # Add ability to only backup specific mailboxes, by using the # | ||
+ | # | ||
+ | # | ||
+ | # Add the calculation of the script runtime. | ||
+ | # | ||
+ | # -------------------------------------------------------------------------- # | ||
+ | # Version | ||
+ | # Description : Add a switch to enable or disable e-mail address check, when # | ||
+ | # | ||
+ | # | ||
+ | # -------------------------------------------------------------------------- # | ||
+ | # Version | ||
+ | # Description : Code redesign. | ||
+ | # -------------------------------------------------------------------------- # | ||
+ | # Version | ||
+ | # Description : GitHub Issue #12 # | ||
+ | # | ||
+ | # | ||
+ | # the mailboxes was introduced. This allows the use of a # | ||
+ | # | ||
+ | # on a faster storage medium, or also on a local storage | ||
+ | # | ||
+ | # an NFS mounted storage. | ||
+ | # | ||
# -------------------------------------------------------------------------- # | # -------------------------------------------------------------------------- # | ||
# Version | # Version | ||
Zeile 189: | Zeile 232: | ||
# CUSTOM - Backup-Files. | # CUSTOM - Backup-Files. | ||
+ | TMP_FOLDER='/ | ||
DIR_BACKUP='/ | DIR_BACKUP='/ | ||
FILE_BACKUP=dovecot_backup_`date ' | FILE_BACKUP=dovecot_backup_`date ' | ||
Zeile 199: | Zeile 243: | ||
MAILDIR_USER=' | MAILDIR_USER=' | ||
MAILDIR_GROUP=' | MAILDIR_GROUP=' | ||
+ | |||
+ | # CUSTOM - Path and file name of a file with e-mail addresses to backup, if | ||
+ | # SET. If NOT, the script will determine all mailboxes by default. | ||
+ | # FILE_USERLIST='/ | ||
+ | # - OR - | ||
+ | # FILE_USERLIST='' | ||
+ | FILE_USERLIST='' | ||
+ | |||
+ | # CUSTOM - Check when FILE_USERLIST was used, if the user per line was a | ||
+ | # valid e-mail address [Y|N]. | ||
+ | FILE_USERLIST_VALIDATE_EMAIL=' | ||
# CUSTOM - Mail-Recipient. | # CUSTOM - Mail-Recipient. | ||
Zeile 221: | Zeile 276: | ||
CHOWN_COMMAND=`command -v chown` | CHOWN_COMMAND=`command -v chown` | ||
CHMOD_COMMAND=`command -v chmod` | CHMOD_COMMAND=`command -v chmod` | ||
+ | MKTEMP_COMMAND=`command -v mktemp` | ||
+ | GREP_COMMAND=`command -v grep` | ||
+ | MV_COMMAND=`which --skip-alias mv` | ||
FILE_LOCK='/ | FILE_LOCK='/ | ||
FILE_LOG='/ | FILE_LOG='/ | ||
Zeile 229: | Zeile 287: | ||
VAR_SENDER=' | VAR_SENDER=' | ||
VAR_EMAILDATE=`$DATE_COMMAND '+%a, %d %b %Y %H:%M:%S (%Z)'` | VAR_EMAILDATE=`$DATE_COMMAND '+%a, %d %b %Y %H:%M:%S (%Z)'` | ||
+ | declare -a VAR_LISTED_USER=() | ||
declare -a VAR_FAILED_USER=() | declare -a VAR_FAILED_USER=() | ||
VAR_COUNT_USER=0 | VAR_COUNT_USER=0 | ||
Zeile 250: | Zeile 309: | ||
function movelog() { | function movelog() { | ||
- | | + | $CAT_COMMAND $FILE_LAST_LOG >> $FILE_LOG |
- | $RM_COMMAND -f $FILE_LAST_LOG | + | $RM_COMMAND -f $FILE_LAST_LOG |
- | $RM_COMMAND -f $FILE_LOCK | + | $RM_COMMAND -f $FILE_LOCK |
} | } | ||
Zeile 279: | Zeile 338: | ||
$RM_COMMAND -f $FILE_MAIL | $RM_COMMAND -f $FILE_MAIL | ||
+ | } | ||
+ | |||
+ | function error () { | ||
+ | # Parameters. | ||
+ | CODE_ERROR=" | ||
+ | |||
+ | sendmail ERROR | ||
+ | movelog | ||
+ | exit $CODE_ERROR | ||
+ | } | ||
+ | |||
+ | function headerblock () { | ||
+ | # Parameters. | ||
+ | TEXT_INPUT=" | ||
+ | LINE_COUNT=68 | ||
+ | |||
+ | # Help variables. | ||
+ | WORD_COUNT=`echo $TEXT_INPUT | wc -c` | ||
+ | CHAR_AFTER=`expr $LINE_COUNT - $WORD_COUNT - 5` | ||
+ | LINE_SPACE=`expr $LINE_COUNT - 3` | ||
+ | |||
+ | # Format placeholder. | ||
+ | if [ " | ||
+ | CHAR_AFTER=" | ||
+ | fi | ||
+ | |||
+ | printf -v char ' | ||
+ | printf -v line ' | ||
+ | |||
+ | log " | ||
+ | log "| $TEXT_INPUT${char// | ||
+ | log " | ||
+ | } | ||
+ | |||
+ | function logline () { | ||
+ | # Parameters. | ||
+ | TEXT_INPUT=" | ||
+ | TRUE_FALSE=" | ||
+ | LINE_COUNT=68 | ||
+ | |||
+ | # Help variables. | ||
+ | WORD_COUNT=`echo $TEXT_INPUT | wc -c` | ||
+ | CHAR_AFTER=`expr $LINE_COUNT - $WORD_COUNT - 9` | ||
+ | |||
+ | # Format placeholder. | ||
+ | if [ " | ||
+ | CHAR_AFTER=" | ||
+ | fi | ||
+ | |||
+ | printf -v char ' | ||
+ | |||
+ | if [ " | ||
+ | log " | ||
+ | else | ||
+ | log " | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | function checkcommand () { | ||
+ | # Parameters. | ||
+ | CHECK_COMMAND=" | ||
+ | |||
+ | if [ ! -s " | ||
+ | logline "Check if command ' | ||
+ | error 10 | ||
+ | else | ||
+ | logline "Check if command ' | ||
+ | fi | ||
} | } | ||
# Main. | # Main. | ||
log "" | log "" | ||
- | log "+-----------------------------------------------------------------+" | + | RUN_TIMESTAMP=`$DATE_COMMAND '+%s'` |
- | log "| Start backup the mailboxes | + | headerblock |
- | log " | + | |
log "" | log "" | ||
- | log "Run script with following parameter:" | + | log "SCRIPT_NAME.................: $SCRIPT_NAME" |
log "" | log "" | ||
- | log "SCRIPT_NAME...: $SCRIPT_NAME" | + | log "TMP_FOLDER..................: |
+ | log " | ||
log "" | log "" | ||
- | log "DIR_BACKUP....: $DIR_BACKUP" | + | log "MAIL_RECIPIENT..............: |
+ | log " | ||
log "" | log "" | ||
- | log "MAIL_RECIPIENT: $MAIL_RECIPIENT" | + | log "FILE_USERLIST...............: $FILE_USERLIST" |
- | log "MAIL_STATUS...: $MAIL_STATUS" | + | log "FILE_USERLIST_VALIDATE_EMAIL: $FILE_USERLIST_VALIDATE_EMAIL" |
log "" | log "" | ||
# Check if command (file) NOT exist OR IS empty. | # Check if command (file) NOT exist OR IS empty. | ||
- | if [ ! -s "$DSYNC_COMMAND" ]; then | + | checkcommand |
- | log "Check if command '$DSYNC_COMMAND' | + | checkcommand |
- | | + | checkcommand $TOUCH_COMMAND |
- | | + | checkcommand $RM_COMMAND |
- | exit 11 | + | checkcommand $CAT_COMMAND |
- | else | + | checkcommand $DATE_COMMAND |
- | log "Check if command '$DSYNC_COMMAND' | + | checkcommand |
- | fi | + | checkcommand $CHOWN_COMMAND |
+ | checkcommand $CHMOD_COMMAND | ||
+ | checkcommand $GREP_COMMAND | ||
+ | checkcommand $MKTEMP_COMMAND | ||
+ | checkcommand $MV_COMMAND | ||
+ | checkcommand $PROG_SENDMAIL | ||
- | # Check if command (file) NOT exist OR IS empty. | + | # Check if LOCK file NOT exist. |
- | if [ ! -s "$TAR_COMMAND" ]; then | + | if [ ! -e "$FILE_LOCK" ]; then |
- | | + | |
- | sendmail ERROR | + | |
- | movelog | + | |
- | exit 12 | + | |
- | else | + | |
- | log "Check if command ' | + | |
- | fi | + | |
- | # Check if command (file) NOT exist OR IS empty. | + | |
- | if [ ! -s "$TOUCH_COMMAND" ]; then | + | |
- | log "Check if command '$TOUCH_COMMAND' | + | |
- | sendmail ERROR | + | |
- | movelog | + | |
- | exit 13 | + | |
else | else | ||
- | | + | |
+ | log "" | ||
+ | log " | ||
+ | log "" | ||
+ | error 20 | ||
fi | fi | ||
- | # Check if command (file) | + | # Check if DIR_BACKUP directory |
- | if [ ! -s "$RM_COMMAND" ]; then | + | if [ ! -d "$DIR_BACKUP" ]; then |
- | | + | |
- | | + | $MKDIR_COMMAND -p $DIR_BACKUP |
- | | + | if [ " |
- | exit 14 | + | logline |
+ | error 21 | ||
+ | else | ||
+ | | ||
+ | fi | ||
else | else | ||
- | | + | |
fi | fi | ||
- | # Check if command (file) | + | # Check if FILE_USERLIST |
- | if [ ! -s "$CAT_COMMAND" ]; then | + | log "" |
- | log "Check if command ' | + | if [ ! -n "$FILE_USERLIST" |
- | sendmail ERROR | + | log "Check if the variable FILE_USERLIST is set ................[ |
- | movelog | + | log "Mailboxes to backup will be determined by doveadm user \" |
- | exit 15 | + | |
- | else | + | |
- | log "Check if command ' | + | |
- | fi | + | |
- | # Check if command (file) NOT exist OR IS empty. | + | for users in `doveadm user "*"`; do |
- | if [ ! -s "$DATE_COMMAND" | + | VAR_LISTED_USER+=($users); |
- | log "Check if command '$DATE_COMMAND' | + | done |
- | sendmail ERROR | + | |
- | movelog | + | |
- | exit 16 | + | |
else | else | ||
- | | + | |
- | fi | + | log " |
+ | log "" | ||
+ | log "- File: [$FILE_USERLIST]" | ||
- | # Check if command (file) NOT exist OR IS empty. | + | # Check if file exists. |
- | if [ ! -s "$MKDIR_COMMAND" ]; then | + | if [ -f "$FILE_USERLIST" ]; then |
- | | + | |
- | sendmail ERROR | + | else |
- | movelog | + | |
- | exit 17 | + | log "" |
- | else | + | error 30 |
- | | + | fi |
- | fi | + | |
- | # Check if command (file) NOT exist OR IS empty. | + | # Check if file is readable. |
- | if [ ! -s "$CHOWN_COMMAND" ]; then | + | if [ -r "$FILE_USERLIST" ]; then |
- | | + | |
- | sendmail ERROR | + | else |
- | movelog | + | |
- | exit 18 | + | log "" |
- | else | + | error 31 |
- | | + | fi |
- | fi | + | |
- | # Check if command (file) NOT exist OR IS empty. | + | # Read file into variable. |
- | if [ ! -s "$CHMOD_COMMAND" | + | while IFS= read -r line |
- | log "Check if command '$CHMOD_COMMAND' | + | do |
- | | + | # Check for valid e-mail address. |
- | movelog | + | if [ $FILE_USERLIST_VALIDATE_EMAIL = ' |
- | exit 19 | + | # Check if basic email address syntax is valid. |
- | else | + | if echo "${line}" |
- | log "Check if command '$CHMOD_COMMAND' | + | VAR_LISTED_USER+=($line); |
- | fi | + | else |
+ | log "" | ||
+ | log " | ||
- | # Check if command | + | ((VAR_COUNT_FAIL++)) |
- | if [ ! -s "$PROG_SENDMAIL" | + | VAR_FAILED_USER+=($line); |
- | | + | fi |
- | | + | else |
- | | + | VAR_LISTED_USER+=($line); |
- | exit 20 | + | fi |
- | else | + | done <"$FILE_USERLIST" |
- | log "Check if command ' | + | |
+ | # Check if VAR_COUNT_FAIL is greater than zero. If YES, set VAR_COUNT_USER to VAR_COUNT_FAIL. | ||
+ | if [ " | ||
+ | VAR_COUNT_USER=$VAR_COUNT_FAIL | ||
+ | fi | ||
fi | fi | ||
- | # Check if LOCK file NOT exist. | + | # Start backup. |
- | if [ ! -e "$FILE_LOCK" | + | log "" |
- | log "Check if script is NOT already runnig .....................[ | + | headerblock "Run backup |
+ | log "" | ||
- | | + | # Check if TMP_FOLDER directory path NOT exists, else create it. |
+ | if [ ! -d "$TMP_FOLDER" | ||
+ | logline "Check if TMP_FOLDER exists " false | ||
+ | $MKDIR_COMMAND -p $TMP_FOLDER | ||
+ | if [ " | ||
+ | logline " | ||
+ | error 40 | ||
+ | else | ||
+ | logline " | ||
+ | fi | ||
else | else | ||
- | | + | |
- | log "" | + | |
- | log " | + | |
- | log "" | + | |
- | sendmail ERROR | + | |
- | movelog | + | |
- | exit 30 | + | |
fi | fi | ||
- | # Check if DIR_BACKUP Directory NOT exists. | + | # Make temporary directory DIR_TEMP inside TMP_FOLDER. |
- | if [ ! -d "$DIR_BACKUP" ]; then | + | DIR_TEMP=$($MKTEMP_COMMAND -d -p $TMP_FOLDER -t $SCRIPT_NAME-XXXXXXXXXXXX) |
- | | + | if [ "$?" != "0" ]; then |
- | | + | logline |
- | log " | + | error 41 |
else | else | ||
- | | + | logline " |
+ | log "" | ||
fi | fi | ||
- | # Start backup. | + | # Set rights permissions to DIR_TEMP. |
- | log "" | + | $CHOWN_COMMAND |
- | log "+-----------------------------------------------------------------+" | + | |
- | log "| Run backup | + | |
- | log " | + | |
- | log "" | + | |
# Start real backup process for all users. | # Start real backup process for all users. | ||
- | for users in `doveadm user "*"`; do | + | for users in "${VAR_LISTED_USER[@]}"; do |
- | log "Start backup process for user: $users ..." | + | log "Start backup process for user: $users ..." |
- | | + | ((VAR_COUNT_USER++)) |
- | DOMAINPART=${users# | + | DOMAINPART=${users# |
- | LOCALPART=${users%%@*} | + | LOCALPART=${users%%@*} |
- | LOCATION=" | + | LOCATION=" |
- | USERPART=" | + | USERPART=" |
- | | + | log " |
- | $DSYNC_COMMAND -o plugin/ | + | $DSYNC_COMMAND -o plugin/ |
- | | + | # Check the status of dsync and continue the script depending on the result. |
- | if [ " | + | if [ " |
- | case " | + | case " |
- | 1) log " | + | 1) log " |
- | ;; | + | ;; |
- | 2) log " | + | 2) log " |
- | ;; | + | ;; |
- | esac | + | esac |
- | if [ " | + | if [ " |
- | log " | + | log " |
- | fi | + | fi |
- | | + | ((VAR_COUNT_FAIL++)) |
- | VAR_FAILED_USER+=($users); | + | VAR_FAILED_USER+=($users); |
- | else | + | else |
- | log " | + | log " |
- | | + | cd $DIR_TEMP |
- | | + | log " |
- | $TAR_COMMAND -cvzf $users-$FILE_BACKUP $USERPART --atime-preserve --preserve-permissions | + | $TAR_COMMAND -cvzf $users-$FILE_BACKUP $USERPART --atime-preserve --preserve-permissions |
- | | + | log " |
- | (ls -t $users-$FILE_DELETE|head -n $BACKUPFILES_DELETE; | + | $RM_COMMAND "$DIR_TEMP/$DOMAINPART" |
- | if [ " | + | if [ " |
- | | + | |
- | else | + | else |
- | | + | |
- | fi | + | fi |
- | | + | log "Copying archive file for user: $users ..." |
- | $RM_COMMAND | + | $MV_COMMAND |
- | if [ " | + | if [ " |
- | | + | |
- | else | + | else |
- | | + | |
- | fi | + | fi |
- | | + | |
- | | + | cd $DIR_BACKUP |
+ | |||
+ | log " | ||
+ | (ls -t $users-$FILE_DELETE|head -n $BACKUPFILES_DELETE; | ||
+ | if [ " | ||
+ | logline " | ||
+ | else | ||
+ | logline " | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | log "Ended backup process for user: $users ..." | ||
log "" | log "" | ||
done | done | ||
+ | |||
+ | # Delete the temporary folder DIR_TEMP. | ||
+ | $RM_COMMAND $DIR_TEMP -rf | ||
+ | if [ " | ||
+ | logline " | ||
+ | error 42 | ||
+ | else | ||
+ | logline " | ||
+ | log "" | ||
+ | fi | ||
# Set owner and rights permissions to backup directory and backup files. | # Set owner and rights permissions to backup directory and backup files. | ||
Zeile 494: | Zeile 644: | ||
log "" | log "" | ||
$RM_COMMAND -f $FILE_LOCK | $RM_COMMAND -f $FILE_LOCK | ||
- | sendmail ERROR | + | error |
- | movelog | + | |
- | exit 99 | + | |
else | else | ||
- | log "" | + | headerblock |
- | log " | + | |
- | log " | + | |
- | log " | + | |
log "" | log "" | ||
fi | fi | ||
# Finish syncing with runntime statistics. | # Finish syncing with runntime statistics. | ||
- | log "+-----------------------------------------------------------------+" | + | headerblock |
- | log "| Runntime | + | |
- | log " | + | |
log "" | log "" | ||
log "- Number of determined users: $VAR_COUNT_USER" | log "- Number of determined users: $VAR_COUNT_USER" | ||
Zeile 514: | Zeile 657: | ||
if [ " | if [ " | ||
- | | + | log "- ...Mailbox of failed users: " |
- | for i in " | + | for i in " |
- | do | + | do |
- | log "- ... $i" | + | log "- ... $i" |
- | done | + | done |
fi | fi | ||
log "" | log "" | ||
- | log "+-----------------------------------------------------------------+" | + | END_TIMESTAMP=`$DATE_COMMAND ' |
- | log "| Finish......................................................... |" | + | log "Runtime: `$DATE_COMMAND |
- | log "+-----------------------------------------------------------------+" | + | log "" |
+ | headerblock | ||
log "" | log "" | ||
- | # If errors | + | # If errors |
if [ " | if [ " | ||
sendmail ERROR | sendmail ERROR | ||
- | | + | movelog |
- | exit 1 | + | exit 1 |
else | else | ||
- | | + | # Status e-mail. |
- | if [ $MAIL_STATUS = ' | + | if [ $MAIL_STATUS = ' |
- | sendmail STATUS | + | sendmail STATUS |
- | fi | + | fi |
- | movelog | + | movelog |
- | exit 0 | + | exit 0 |
fi | fi | ||
+ | </ | ||
+ | |||
+ | ==== Beispieldatei: | ||
+ | |||
+ | Nachfolgend eine Beispiel für den Inhalt einer Datei, welche unter der Variable: | ||
+ | <code bash> | ||
+ | # CUSTOM - Path and file name of a file with e-mail addresses to backup, if | ||
+ | # SET. If NOT, the script will determine all mailboxes by default. | ||
+ | # FILE_USERLIST='/ | ||
+ | # - OR - | ||
+ | # FILE_USERLIST='' | ||
+ | FILE_USERLIST='/ | ||
+ | </ | ||
+ | definiert werden kann: | ||
+ | |||
+ | < | ||
+ | klaus@tachtler.net | ||
+ | petra@tachtler.net | ||
+ | </ | ||
+ | **__oder__** | ||
+ | |||
+ | < | ||
+ | klaus | ||
+ | petra | ||
</ | </ | ||
Zeile 547: | Zeile 715: | ||
* ''/ | * ''/ | ||
+ | **__OHNE__ '' | ||
+ | < | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | 2019/01/30 14: | ||
+ | </ | ||
+ | |||
+ | **__MIT__ '' | ||
< | < | ||
- | 2017/01/11 15: | + | 2019/01/30 15:07:51 INFO: +-----------------------------------------------------------------+ |
- | 2017/ | + | 2019/01/30 15:07:51 INFO: | Start backup |
- | 2017/01/11 15:28:38 INFO: | Start backup the mailboxes | + | 2019/01/30 15:07:51 INFO: +-----------------------------------------------------------------+ |
- | 2017/01/11 15:28:38 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15: |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if command '/ | + | 2019/01/30 15:07:51 INFO: Check if command '/ |
- | 2017/01/11 15:28:38 INFO: Check if script is NOT already runnig .....................[ OK ] | + | 2019/01/30 15: |
- | 2017/01/11 15:28:38 INFO: Check if DIR_BACKUP exists.................................[ OK ] | + | 2019/01/30 15:07:51 INFO: Check if script is NOT already runnig .....................[ OK ] |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15:07:51 INFO: Check if DIR_BACKUP exists.................................[ OK ] |
- | 2017/01/11 15:28:38 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:28:38 INFO: | Run backup dovecot_backup ..................................... | | + | 2019/01/30 15: |
- | 2017/01/11 15:28:38 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15: |
- | 2017/01/11 15:28:38 | + | 2019/01/30 15: |
- | 2017/01/11 15:28:39 INFO: Start backup process for user: klaus@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:28:39 INFO: Extract mailbox data for user: klaus@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:29:46 INFO: Packaging to archive for user: klaus@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:29:49 INFO: Delete archive files for user: klaus@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:29:49 INFO: Delete old archive files /srv/backup ...................[FAILED] | + | 2019/01/30 15: |
- | 2017/01/11 15:29:49 INFO: Delete mailbox files for user: klaus@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:29:49 INFO: Delete mailbox files at: /srv/backup ...................[ OK ] | + | 2019/ |
- | 2017/01/11 15:29:49 INFO: Ended backup process for user: klaus@tachtler.net ... | + | 2019/01/30 15:07:51 INFO: | Run backup dovecot_backup ..................................... | |
- | 2017/01/11 15:29:49 | + | 2019/01/30 15:07:51 INFO: +-----------------------------------------------------------------+ |
- | 2017/01/11 15:29:49 INFO: Start backup process for user: petra@tachtler.net ... | + | 2019/01/30 15:07:51 |
- | 2017/01/11 15:29:49 INFO: Extract mailbox data for user: petra@tachtler.net ... | + | 2019/01/30 15:07:51 INFO: Start backup process for user: klaus@tachtler.net ... |
- | 2017/01/11 15:29:58 INFO: Packaging to archive for user: petra@tachtler.net ... | + | 2019/01/30 15:07:51 INFO: Extract mailbox data for user: klaus@tachtler.net ... |
- | 2017/01/11 15:30:00 INFO: Delete archive files for user: petra@tachtler.net ... | + | 2019/01/30 15: |
- | 2017/01/11 15:30:00 INFO: Delete old archive files /srv/backup ...................[FAILED] | + | 2019/ |
- | 2017/01/11 15:30:00 INFO: Delete mailbox files for user: petra@tachtler.net ... | + | 2019/01/30 15:07:54 INFO: Delete archive files for user: klaus@tachtler.net ... |
- | 2017/01/11 15:30:00 INFO: Delete mailbox files at: /srv/backup ...................[ OK ] | + | 2019/01/30 15:07:54 INFO: Delete old archive files / |
- | 2017/01/11 15:30:00 INFO: Ended backup process for user: petra@tachtler.net ... | + | 2019/01/30 15:07:54 INFO: Delete mailbox files for user: klaus@tachtler.net ... |
- | 2017/01/11 15:30:02 | + | 2019/01/30 15:07:54 INFO: Delete mailbox files at: / |
- | 2017/01/11 15:30:02 INFO: | + | 2019/01/30 15:07:54 INFO: Ended backup process for user: klaus@tachtler.net ... |
- | 2017/ | + | 2019/01/30 15:07:54 |
- | 2017/01/11 15:30:02 INFO: | End backup dovecot_backup ..................................... | | + | 2019/01/30 15:07:54 INFO: Start backup process for user: petra@tachtler.net ... |
- | 2017/01/11 15:30:02 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:54 INFO: Extract mailbox data for user: petra@tachtler.net ... |
- | 2017/01/11 15:30:02 | + | 2019/01/30 15: |
- | 2017/01/11 15:30:02 INFO: +-----------------------------------------------------------------+ | + | 2019/ |
- | 2017/01/11 15:30:02 INFO: | Runntime | + | 2019/01/30 15:07:56 INFO: Delete archive files for user: petra@tachtler.net ... |
- | 2017/01/11 15:30:02 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:56 INFO: Delete old archive files / |
- | 2017/01/11 15:30:02 | + | 2019/01/30 15:07:56 INFO: Delete mailbox files for user: petra@tachtler.net ... |
- | 2017/01/11 15:30:02 INFO: - Number of determined users: | + | 2019/01/30 15:07:56 INFO: Delete mailbox files at: / |
- | 2017/01/11 15:30:02 INFO: - ...Summary of failed users: | + | 2019/01/30 15:07:56 INFO: Ended backup process for user: petra@tachtler.net ... |
- | 2017/01/11 15:30:02 | + | 2019/01/30 15:07:56 |
- | 2017/01/11 15:30:02 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ |
- | 2017/01/11 15:30:02 INFO: | Finish......................................................... | + | 2019/01/30 15:07:56 INFO: | End backup dovecot_backup ..................................... | |
- | 2017/01/11 15:30:02 INFO: +-----------------------------------------------------------------+ | + | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ |
- | 2017/01/11 15:30:02 INFO: | + | 2019/01/30 15:07:56 |
+ | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ | ||
+ | 2019/01/30 15:07:56 INFO: | Runtime | ||
+ | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ | ||
+ | 2019/01/30 15:07:56 | ||
+ | 2019/01/30 15:07:56 INFO: - Number of determined users: | ||
+ | 2019/01/30 15:07:56 INFO: - ...Summary of failed users: | ||
+ | 2019/01/30 15:07:56 INFO: - ...Mailbox of failed users: | ||
+ | 2019/01/30 15:07:56 | ||
+ | 2019/01/30 15:07:56 INFO: | ||
+ | 2019/01/30 15: | ||
+ | 2019/01/30 15: | ||
+ | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ | ||
+ | 2019/01/30 15:07:56 INFO: | Finished creating the backups [Wed, 30 Jan 2019 15:07:56 (CET)] | ||
+ | 2019/01/30 15:07:56 INFO: +-----------------------------------------------------------------+ | ||
+ | 2019/01/30 15:07:56 INFO: | ||
</ | </ | ||
tachtler/dovecot_backup_-_skript.txt · Zuletzt geändert: 2023/07/05 19:07 von klaus