mirror of
https://github.com/deajan/obackup.git
synced 2024-12-26 07:23:41 +01:00
Rebuilt targets
This commit is contained in:
parent
cfbec5120b
commit
4e9eee7c48
@ -10,7 +10,7 @@ PROGRAM="obackup"
|
|||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=2.1-dev
|
PROGRAM_VERSION=2.1-dev
|
||||||
PROGRAM_BUILD=2016090405
|
PROGRAM_BUILD=2016090901
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||||
@ -1603,10 +1603,10 @@ function CheckEnvironment {
|
|||||||
function CheckCryptEnvironnment {
|
function CheckCryptEnvironnment {
|
||||||
if ! type gpg2 > /dev/null 2>&1 ; then
|
if ! type gpg2 > /dev/null 2>&1 ; then
|
||||||
if ! type gpg > /dev/null 2>&1; then
|
if ! type gpg > /dev/null 2>&1; then
|
||||||
Logger "gpg2 nor gpg not present. Cannot encrypt backup files." "CRITICAL"
|
Logger "Programs gpg2 nor gpg not present. Cannot encrypt backup files." "CRITICAL"
|
||||||
CAN_BACKUP_FILES=false
|
CAN_BACKUP_FILES=false
|
||||||
else
|
else
|
||||||
Logger "gpg2 not present, falling back to gpg." "NOTICE"
|
Logger "Program gpg2 not present, falling back to gpg." "NOTICE"
|
||||||
CRYPT_TOOL=gpg
|
CRYPT_TOOL=gpg
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -1670,9 +1670,15 @@ function CheckCurrentConfig {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ENCRYPTION" == "yes" ] && [ "$CRYPT_STORAGE" == "" ]; then
|
if [ "$ENCRYPTION" == "yes" ]; then
|
||||||
Logger "CRYPT_STORAGE not defined." "CRITICAL"
|
if [ "$CRYPT_STORAGE" == "" ]; then
|
||||||
exit 1
|
Logger "CRYPT_STORAGE not defined." "CRITICAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "$GPG_RECIPIENT" == "" ]; then
|
||||||
|
Logger "No GPG recipient defined." "CRITICAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -2453,7 +2459,7 @@ function BackupDatabases {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#TODO: exclusions don't work for encrypted files
|
#TODO: exclusions don't work for encrypted files
|
||||||
#TODO: add ParallelExec here ? Also rework ParallelExec to use files or variables, vars are max 4M, if cannot be combined, create ParallelExecFromFile
|
#TODO: add ParallelExec here ?
|
||||||
function EncryptFiles {
|
function EncryptFiles {
|
||||||
local filePath="${1}" # Path of files to encrypt
|
local filePath="${1}" # Path of files to encrypt
|
||||||
local destPath="${2}" # Path to store encrypted files
|
local destPath="${2}" # Path to store encrypted files
|
||||||
@ -2725,8 +2731,8 @@ function _RotateBackupsLocal {
|
|||||||
local cmd
|
local cmd
|
||||||
local path
|
local path
|
||||||
|
|
||||||
#TODO: Replace this iname with regex .*$PROGRAM\.[1-9][0-9]+
|
#TODO: Replace this -name with regex .*$PROGRAM\.[1-9][0-9]+
|
||||||
find "$backup_path" -mindepth 1 -maxdepth 1 ! -iname "*.$PROGRAM.[0-9]*" -print0 | while IFS= read -r -d $'\0' backup; do
|
find "$backup_path" -mindepth 1 -maxdepth 1 ! -name "*.$PROGRAM.[0-9]*" -print0 | while IFS= read -r -d $'\0' backup; do
|
||||||
copy=$rotate_copies
|
copy=$rotate_copies
|
||||||
while [ $copy -gt 1 ]; do
|
while [ $copy -gt 1 ]; do
|
||||||
if [ $copy -eq $rotate_copies ]; then
|
if [ $copy -eq $rotate_copies ]; then
|
||||||
|
24
obackup.sh
24
obackup.sh
@ -10,7 +10,7 @@ PROGRAM="obackup"
|
|||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=2.1-dev
|
PROGRAM_VERSION=2.1-dev
|
||||||
PROGRAM_BUILD=2016090405
|
PROGRAM_BUILD=2016090901
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||||
@ -1506,10 +1506,10 @@ function CheckEnvironment {
|
|||||||
function CheckCryptEnvironnment {
|
function CheckCryptEnvironnment {
|
||||||
if ! type gpg2 > /dev/null 2>&1 ; then
|
if ! type gpg2 > /dev/null 2>&1 ; then
|
||||||
if ! type gpg > /dev/null 2>&1; then
|
if ! type gpg > /dev/null 2>&1; then
|
||||||
Logger "gpg2 nor gpg not present. Cannot encrypt backup files." "CRITICAL"
|
Logger "Programs gpg2 nor gpg not present. Cannot encrypt backup files." "CRITICAL"
|
||||||
CAN_BACKUP_FILES=false
|
CAN_BACKUP_FILES=false
|
||||||
else
|
else
|
||||||
Logger "gpg2 not present, falling back to gpg." "NOTICE"
|
Logger "Program gpg2 not present, falling back to gpg." "NOTICE"
|
||||||
CRYPT_TOOL=gpg
|
CRYPT_TOOL=gpg
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -1572,9 +1572,15 @@ function CheckCurrentConfig {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ENCRYPTION" == "yes" ] && [ "$CRYPT_STORAGE" == "" ]; then
|
if [ "$ENCRYPTION" == "yes" ]; then
|
||||||
Logger "CRYPT_STORAGE not defined." "CRITICAL"
|
if [ "$CRYPT_STORAGE" == "" ]; then
|
||||||
exit 1
|
Logger "CRYPT_STORAGE not defined." "CRITICAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "$GPG_RECIPIENT" == "" ]; then
|
||||||
|
Logger "No GPG recipient defined." "CRITICAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -2334,7 +2340,7 @@ function BackupDatabases {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#TODO: exclusions don't work for encrypted files
|
#TODO: exclusions don't work for encrypted files
|
||||||
#TODO: add ParallelExec here ? Also rework ParallelExec to use files or variables, vars are max 4M, if cannot be combined, create ParallelExecFromFile
|
#TODO: add ParallelExec here ?
|
||||||
function EncryptFiles {
|
function EncryptFiles {
|
||||||
local filePath="${1}" # Path of files to encrypt
|
local filePath="${1}" # Path of files to encrypt
|
||||||
local destPath="${2}" # Path to store encrypted files
|
local destPath="${2}" # Path to store encrypted files
|
||||||
@ -2600,8 +2606,8 @@ function _RotateBackupsLocal {
|
|||||||
local cmd
|
local cmd
|
||||||
local path
|
local path
|
||||||
|
|
||||||
#TODO: Replace this iname with regex .*$PROGRAM\.[1-9][0-9]+
|
#TODO: Replace this -name with regex .*$PROGRAM\.[1-9][0-9]+
|
||||||
find "$backup_path" -mindepth 1 -maxdepth 1 ! -iname "*.$PROGRAM.[0-9]*" -print0 | while IFS= read -r -d $'\0' backup; do
|
find "$backup_path" -mindepth 1 -maxdepth 1 ! -name "*.$PROGRAM.[0-9]*" -print0 | while IFS= read -r -d $'\0' backup; do
|
||||||
copy=$rotate_copies
|
copy=$rotate_copies
|
||||||
while [ $copy -gt 1 ]; do
|
while [ $copy -gt 1 ]; do
|
||||||
if [ $copy -eq $rotate_copies ]; then
|
if [ $copy -eq $rotate_copies ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user