diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-01-30 15:55:50 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-01-30 15:55:50 +0000 |
commit | dbba658aa7bbefec00171c47187ac394c2d4a887 (patch) | |
tree | cd3d467f8af68656562f29cd88039c3acc61c4cd | |
parent | 58ae9d8355e6aeadb49bdbf03bac0df385237028 (diff) | |
download | alpine-backup-dbba658aa7bbefec00171c47187ac394c2d4a887.tar.bz2 alpine-backup-dbba658aa7bbefec00171c47187ac394c2d4a887.tar.xz |
create backup directories from main script
-rwxr-xr-x | alpine-backup | 2 | ||||
-rwxr-xr-x | profiles/backup-mysql | 1 |
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 |