Commit ce666a82 authored by Fjen Undso's avatar Fjen Undso
Browse files

fix some typos

parent 847ccca6
......@@ -10,59 +10,43 @@
#### BEGIN CONFIGURATION #######################################################
### system settings
# Absolute path to local backup directory
declare -r BACKUP_PATH=""
# Send mail to this address in case of any errors. No mail if empty.
declare -r ADMINMAIL=""
# Keep so many backups or all if 0
declare -r NUMBACKUPS=30
# Combine tables of a database in single file
declare -r USETAR=1
declare -r USE_TAR=1
# Compression utility (like gzip, bzip2, xz, lzop), parameters allowed
# Disable compression if empty
declare -r COMPRESS="xz -T0"
# The umask that is used for the backup. Leave empty to keep unchanged
declare -r UMASK=0077
### MySQL settings
declare -r DB_HOST=""
declare -r DB_USER=""
declare -r DB_PASS=""
declare -r DB_EXCLUDE='^(?!(mysql|phpmyadmin|information_schema|performance_schema))'
### Remote server settings
# Type of ftp connection: ftp, ftps, sftp
# Leave empty to disable upload
declare -r FTP_TYPE=""
declare -r FTP_HOST=""
declare -r FTP_USER=""
declare -r FTP_PASS="" # if empty, ssh key with no password is required
declare -r FTP_PORT="" # empty for default
declare -r FTP_DIR=""
declare -r FTP_NUMBACKUPS=90
### GPG settings
# GPG key ID used for encryption starting with "0x" (preferred)
# or passphrase for symmetric encryption or empty (no encryption).
declare -r GPG_KEYID=""
declare -r GPG_PASS=""
################################################################################
......@@ -104,7 +88,7 @@ wants_tar() {
}
wants_upload() {
[[ -z "$FTP_TYPE" ]]
[[ -n "$FTP_TYPE" ]]
}
wants_compression() {
......@@ -238,17 +222,17 @@ encryption() {
fi
cd "$backupdir"
for x in *; do
for i in *; do
if [[ -n "$GPG_KEYID" ]]; then
gpg --batch --encrypt --recipient "$GPG_KEYID" --trust-model always "$x" \
&& rm "$x"
gpg --batch --encrypt --recipient "$GPG_KEYID" --trust-model always "$i" \
&& rm "$i"
else
echo "$GPG_PASS" | gpg --batch --symmetric --passphrase-fd 0 --cipher-algo AES256 "$x" \
echo "$GPG_PASS" | gpg --batch --symmetric --passphrase-fd 0 --cipher-algo AES256 "$i" \
&& rm "$i"
fi
# error because you probably do not want to upload unencrypted backups
[[ $? -ne 0 ]] \
&& error "Encryption of \"$x\" failed."
&& error "Encryption of \"$i\" failed."
done
cd - &> /dev/null
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment