Skip to content

Commit

Permalink
0.6.5 GA
Browse files Browse the repository at this point in the history
  • Loading branch information
framps committed May 6, 2020
1 parent 12fa12f commit 56e303d
Show file tree
Hide file tree
Showing 20 changed files with 2,245 additions and 788 deletions.
71 changes: 41 additions & 30 deletions config/raspiBackup_de.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
#
# Default Konfigurationsdatei für raspiBackup.sh
#
# (C) 2013,2019 framp at linux-tips-and-tricks dot de
# (C) 2013,2020 framp at linux-tips-and-tricks dot de
#
# Weitere Details zu den Parametern finden sich auf
# http://www.linux-tips-and-tricks.de/de/raspibackup/#parameter
#
# $Date: 2019-05-05 17:06:29 +0200$
# $Sha1: 0884c1a$
# $Date: 2020-05-06 20:19:52 +0200$
# $Sha1: 0730e99$
#
####################################################

# folgende Zeile nicht aendern
VERSION_DECONF="0.1.3"
VERSION_CONFIG="0.1.4"

#####################################################
#
Expand All @@ -27,6 +27,15 @@ VERSION_DECONF="0.1.3"
# Pfad wo das Backupfile gespeichert wird
DEFAULT_BACKUPPATH="/backup"

# Typ des Backups: dd, tar or rsync
DEFAULT_BACKUPTYPE="dd"

# zip tar oder dd backup
DEFAULT_ZIP_BACKUP=0

# dd backup sichert nur den von den Partitionen belegten Platz
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0

# Anzahl der zu vorhaltenden Backups
DEFAULT_KEEPBACKUPS=3
# Anzahl der vorzuhaltenden Backups fuer einen speziellen Backuptyp. Falls sie 0 ist wird DEFAULT_KEEPBACKUPS benutzt
Expand All @@ -36,24 +45,20 @@ DEFAULT_KEEPBACKUPS_TAR=0
DEFAULT_KEEPBACKUPS_TGZ=0
DEFAULT_KEEPBACKUPS_RSYNC=0

# Typ des Backups: dd, tar, xbmc or rsync
DEFAULT_BACKUPTYPE="dd"

# zip tar oder dd backup
DEFAULT_ZIP_BACKUP=0

# dd backup sichert nur den von den Partitionen belegten Platz
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0
# Smart recycle
DEFAULT_SMART_RECYCLE=0
# Smart recycle dryrun
DEFAULT_SMART_RECYCLE_DRYRUN=1
# Smart recycle parameters (daily, weekly, monthly and yearly)
DEFAULT_SMART_RECYCLE_OPTIONS="7 4 12 1"

# Durch && getrennte Befehle, die vor dem Starten des Backups auszuführen sind
DEFAULT_STOPSERVICES=""

# Durch && getrennte Befehle, die nach dem Starten des Backups auszuführen sind
DEFAULT_STARTSERVICES=""

# Durch && getrennte Befehle, die ausgeführt werden bevor Services gestoppt werden
DEFAULT_BEFORE_STOPSERVICES=""

# Durch && getrennte Befehle, die ausgeführt werden nachdem die Services wieder gestartet werden
DEFAULT_AFTER_STARTSERVICES=""

Expand All @@ -66,11 +71,27 @@ DEFAULT_SENDER_EMAIL=""
# Weitere Parameter für das eMail programm (Optional)
DEFAULT_EMAIL_PARMS=""

# mailprogram
DEFAULT_MAIL_PROGRAM="mail"

# Telegram token
DEFAULT_TELEGRAM_TOKEN=""
# Telegram target chatid
DEFAULT_TELEGRAM_CHATID=""
# Telegram notifications to send. S(uccess), F(ailure), M(essages as file), m(essages as text)
DEFAULT_TELEGRAM_NOTIFICATIONS="F"

# Sende eMail und/oder Telegram notification wenn der Backup startet
DEFAULT_NOTIFY_START=0

# eMail wird nur gesendet wenn ein Fehler aufgetreten ist. Vorsichtig benutzen !
DEFAULT_MAIL_ON_ERROR_ONLY=0

# Message level (0 = minimal, 1 = detailed)
DEFAULT_MSG_LEVEL=0

# mailprogram
DEFAULT_MAIL_PROGRAM="mail"
# Einfaerben der Konsolenausgaben output (C) und/oder der eMail (M)
DEFAULT_COLORING="CM"

# Gerät wo das Backup restored wird
DEFAULT_RESTORE_DEVICE=""
Expand All @@ -89,7 +110,6 @@ DEFAULT_SKIPLOCALCHECK=0

# Blocksize von dd
DEFAULT_DD_BLOCKSIZE=1M

# Weitere Parameter für dd
DEFAULT_DD_PARMS=""

Expand All @@ -102,15 +122,6 @@ DEFAULT_NOTIFY_UPDATE=1
# Aufzurufende Erweiterungen
DEFAULT_EXTENSIONS=""

# partitionsbasierter backup modus
DEFAULT_PARTITIONBASED_BACKUP=0

# Partitionsnummern, die gesichert werden sollen beim partitionsbasierten Backup
# Um alle partitionen zu sicher benutze "*"
DEFAULT_PARTITIONS_TO_BACKUP="*"
# Partitionsnummern muessen in Klammern stehen. Siehe Beispiel in folgender Zeile fuer die Partitionen 1,2 und 5
# DEFAULT_PARTITIONS_TO_BACKUP=(1 2 5)

# Sprache der Meldungen (DE oder EN)
DEFAULT_LANGUAGE=""

Expand All @@ -130,9 +141,6 @@ DEFAULT_USE_HARDLINKS=1
# Sichere boot partition mit tar
DEFAULT_TAR_BOOT_PARTITION_ENABLED=0

# eMail wird nur gesendet wenn ein Fehler aufgetreten ist. Vorsichtig benutzen !
DEFAULT_MAIL_ON_ERROR_ONLY=0

# Versionen bei denen keine deprecated message gemeldet werden soll, getrennt durch Kommata
DEFAULT_SKIP_DEPRECATED=""

Expand All @@ -153,6 +161,9 @@ DEFAULT_SYSTEMSTATUS=0

# Interval fuer eine Restoretest Erinnerung (Einheit: Monate)
DEFAULT_RESTORE_REMINDER_INTERVAL=6

# Anzahl der Erinnerungen an einen Restoretest
DEFAULT_RESTORE_REMINDER_REPEAT=3

# Optionen fuer partitionsorientierten Modus
DEFAULT_PARTITIONBASED_BACKUP="0"
DEFAULT_PARTITIONS_TO_BACKUP="*"
71 changes: 41 additions & 30 deletions config/raspiBackup_en.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
#
# Default configuration file for raspiBackup.sh
#
# (C) 2013,2019 framp at linux-tips-and-tricks dot de
# (C) 2013,2020 framp at linux-tips-and-tricks dot de
#
# For more details about options visit
# http://www.linux-tips-and-tricks.de/de/raspibackup/#parameter
#
# $Date: 2019-05-05 17:06:29 +0200$
# $Sha1: 0884c1a$
# $Date: 2020-05-06 20:19:52 +0200$
# $Sha1: 0730e99$
#
#####################################################

# do not change following line
VERSION_ENCONF="0.1.3"
VERSION_CONFIG="0.1.4"

#####################################################
#
Expand All @@ -27,6 +27,15 @@ VERSION_ENCONF="0.1.3"
# path to store the backupfile
DEFAULT_BACKUPPATH="/backup"

# type of backup: dd, tar or rsync
DEFAULT_BACKUPTYPE="dd"

# zip tar or dd backup
DEFAULT_ZIP_BACKUP=0

# dd backup will save space used by partitions only
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0

# how many backups to keep
DEFAULT_KEEPBACKUPS=3
# how many backups to keep of the specific backup type. If zero DEFAULT_KEEPBACKUPS is used
Expand All @@ -36,24 +45,20 @@ DEFAULT_KEEPBACKUPS_TAR=0
DEFAULT_KEEPBACKUPS_TGZ=0
DEFAULT_KEEPBACKUPS_RSYNC=0

# type of backup: dd, tar or rsync
DEFAULT_BACKUPTYPE="dd"

# zip tar or dd backup
DEFAULT_ZIP_BACKUP=0

# dd backup will save space used by partitions only
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY=0
# Smart recycle
DEFAULT_SMART_RECYCLE=0
# Smart recycle dryrun
DEFAULT_SMART_RECYCLE_DRYRUN=1
# Smart recycle parameters (daily, weekly, monthly and yearly)
DEFAULT_SMART_RECYCLE_OPTIONS="7 4 12 1"

# commands to stop services before backup separated by &&
DEFAULT_STOPSERVICES=""

# commands to start services after backup separated by &&
DEFAULT_STARTSERVICES=""

# commands to execute before services are stopped separated by &&
DEFAULT_BEFORE_STOPSERVICES=""

# commands to execute when services were started again separated by &&
DEFAULT_AFTER_STARTSERVICES=""

Expand All @@ -66,11 +71,27 @@ DEFAULT_SENDER_EMAIL=""
# Additional parameters for email program (optional)
DEFAULT_EMAIL_PARMS=""

# mailprogram
DEFAULT_MAIL_PROGRAM="mail"

# Telegram token
DEFAULT_TELEGRAM_TOKEN=""
# Telegram target chatid
DEFAULT_TELEGRAM_CHATID=""
# Telegram notifications to send. S(uccess), F(ailure), M(essages as file), m(essages as text)
DEFAULT_TELEGRAM_NOTIFICATIONS="F"

# Send eMail and/or Telegram notification when backup starts
DEFAULT_NOTIFY_START=0

# Send email only in case of errors. Use with care !
DEFAULT_MAIL_ON_ERROR_ONLY=0

# msg level (0 = minimal, 1 = detailed)
DEFAULT_MSG_LEVEL=0

# mailprogram
DEFAULT_MAIL_PROGRAM="mail"
# Colorize console output (C) and/or email (M)
DEFAULT_COLORING="CM"

# restore device
DEFAULT_RESTORE_DEVICE=""
Expand All @@ -89,7 +110,6 @@ DEFAULT_SKIPLOCALCHECK=0

# blocksize used for dd
DEFAULT_DD_BLOCKSIZE=1M

# addition parms used for dd
DEFAULT_DD_PARMS=""

Expand All @@ -102,15 +122,6 @@ DEFAULT_NOTIFY_UPDATE=1
# extensions to call
DEFAULT_EXTENSIONS=""

# partition based backup
DEFAULT_PARTITIONBASED_BACKUP=0

# partition numbers of partitions to save in partitionbased backup mode
# To save all partitions use "*"
DEFAULT_PARTITIONS_TO_BACKUP="*"
# See example in next line how to save partitions 1,2 and 5 only
# DEFAULT_PARTITIONS_TO_BACKUP=(1 2 5)

# language (DE or EN)
DEFAULT_LANGUAGE=""

Expand All @@ -130,9 +141,6 @@ DEFAULT_USE_HARDLINKS=1
# save boot partition with tar
DEFAULT_TAR_BOOT_PARTITION_ENABLED=0

# Send email only in case of errors. Use with care !
DEFAULT_MAIL_ON_ERROR_ONLY=0

# Versions not to generated deprecated messages, separated with commas
DEFAULT_SKIP_DEPRECATED=""

Expand All @@ -153,6 +161,9 @@ DEFAULT_SYSTEMSTATUS=0

# Restoretest reminder interval (unit: months)
DEFAULT_RESTORE_REMINDER_INTERVAL=6

# Number of times to remind to test restore
DEFAULT_RESTORE_REMINDER_REPEAT=3

# Options for partitionoriented mode
DEFAULT_PARTITIONBASED_BACKUP="0"
DEFAULT_PARTITIONS_TO_BACKUP="*"
Binary file modified extensions/raspiBackupSampleExtensions.tgz
Binary file not shown.
9 changes: 6 additions & 3 deletions extensions/raspiBackup_disk_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
########################################################################################################################
#
# Copyright (C) 2017-2018 framp at linux-tips-and-tricks dot de
# Copyright (c) 2017-2018 framp at linux-tips-and-tricks dot de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -27,6 +27,9 @@
#
#######################################################################################################################

GIT_DATE="$Date: 2020-05-06 20:19:52 +0200$"
GIT_COMMIT="$Sha1: 0730e99$"

# set any variables and prefix all names with ext_ and some unique prefix to use a different namespace than the script
ext_diskUsage_post=( $(getDiskUsage) )

Expand All @@ -41,8 +44,8 @@ MSG_EXT_DISK_USAGE3="ext_diskusage_4"
MSG_EN[$MSG_EXT_DISK_USAGE3]="RBK1004I: Free change: %s (%s %%)"
MSG_DE[$MSG_EXT_DISK_USAGE3]="RBK1004I: Änderung freier Platz: %s (%s %%)"
MSG_EXT_DISK_USAGE4="ext_diskusage_5"
MSG_EN[$MSG_EXT_DISK_USAGE4]="RBK1005E: bc not found. Please install bc first."
MSG_DE[$MSG_EXT_DISK_USAGE4]="RBK1004E: bc nicht gefunden. bc muss installiert werden."
MSG_EN[$MSG_EXT_DISK_USAGE4]="RBK1005E: bc not found. Please install bc first with with 'sudo apt-get install bc'."
MSG_DE[$MSG_EXT_DISK_USAGE4]="RBK1004E: bc nicht gefunden. bc muss installiert werden mit 'sudo apt-get install bc'."

# now write message to console and log and email
# $MSG_LEVEL_MINIMAL will write message all the time
Expand Down
5 changes: 4 additions & 1 deletion extensions/raspiBackup_disk_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
#######################################################################################################################
#
# Copyright (C) 2017 framp at linux-tips-and-tricks dot de
# Copyright (c) 2017 framp at linux-tips-and-tricks dot de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -27,6 +27,9 @@
#
#######################################################################################################################

GIT_DATE="$Date: 2020-05-06 20:19:52 +0200$"
GIT_COMMIT="$Sha1: 0730e99$"

# define functions needed
# use local for all variables used so the script namespace is not poluted

Expand Down
5 changes: 4 additions & 1 deletion extensions/raspiBackup_execute_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
#######################################################################################################################
#
# Copyright (C) 2016-2018 framp at linux-tips-and-tricks dot de
# Copyright (c) 2016-2018 framp at linux-tips-and-tricks dot de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -29,6 +29,9 @@
#
#######################################################################################################################

GIT_DATE="$Date: 2020-05-06 20:19:52 +0200$"
GIT_COMMIT="$Sha1: 0730e99$"

if [[ -n $1 ]]; then # was there a return code ? Should be :-)
if [[ "$1" == 0 ]]; then
wall <<< "Extension detected ${0##*/} succeeded :-)"
Expand Down
5 changes: 4 additions & 1 deletion extensions/raspiBackup_fstab_ready.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
#######################################################################################################################
#
# Copyright (C) 2017 framp at linux-tips-and-tricks dot de
# Copyright (c) 2017 framp at linux-tips-and-tricks dot de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -27,6 +27,9 @@
#
#######################################################################################################################

GIT_DATE="$Date: 2020-05-06 20:19:52 +0200$"
GIT_COMMIT="$Sha1: 0730e99$"

# set any messages and prefix message name with ext_ and some unique prefix to use a different namespace than the script
MSG_EXT_FSTAB_COPY="ext_fstab_copy"
MSG_EN[$MSG_EXT_FSTAB_COPY]="RBK1005I: Copy %s to %s"
Expand Down
5 changes: 4 additions & 1 deletion extensions/raspiBackup_mail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
#######################################################################################################################
#
# Copyright (C) 2015-2017 framp at linux-tips-and-tricks dot de
# Copyright (c) 2015-2017 framp at linux-tips-and-tricks dot de
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -28,6 +28,9 @@
#
#######################################################################################################################

GIT_DATE="$Date: 2020-05-06 20:19:52 +0200$"
GIT_COMMIT="$Sha1: 0730e99$"

# Parameters received by script: "$EMAIL" "$subject" "$content" "$EMAIL_PARMS" "$append"

MYSELF=${0##*/}
Expand Down
Loading

0 comments on commit 56e303d

Please sign in to comment.