aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-01-30 15:55:50 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-01-30 15:55:50 +0000
commitdbba658aa7bbefec00171c47187ac394c2d4a887 (patch)
treecd3d467f8af68656562f29cd88039c3acc61c4cd
parent58ae9d8355e6aeadb49bdbf03bac0df385237028 (diff)
downloadalpine-backup-dbba658aa7bbefec00171c47187ac394c2d4a887.tar.bz2
alpine-backup-dbba658aa7bbefec00171c47187ac394c2d4a887.tar.xz
create backup directories from main script
-rwxr-xr-xalpine-backup2
-rwxr-xr-xprofiles/backup-mysql1
2 files changed, 2 insertions, 1 deletions
diff --git a/alpine-backup b/alpine-backup
index 22af5a5..cf05943 100755
--- a/alpine-backup
+++ b/alpine-backup
@@ -9,6 +9,8 @@ else
exit 1
fi
+mkdir -p "$BACKUP_LOCATION" "$BACKUP_CACHE"
+
# set the suffix of backup files when ecryptions is enabled
[ -n "$ENCRYPTION" ] && export SUFFIX=".$ENCRYPTION"
diff --git a/profiles/backup-mysql b/profiles/backup-mysql
index ff6edd6..3c4e232 100755
--- a/profiles/backup-mysql
+++ b/profiles/backup-mysql
@@ -2,7 +2,6 @@
if [ -n "$MYSQL_PASSWORD" ]; then
echo "Dumping databases to: $BACKUP_CACHE/mysql.sql"
- [ -d "$CACHE_DIR" ] || mkdir -p "$BACKUP_CACHE"
mysqldump -u root -p${MYSQL_PASSWORD} --all-databases -r \
$BACKUP_CACHE/mysql.sql
else