Skip to content

Commit 811df17

Browse files
Leons Petrazickisreevejd
authored andcommitted
[0.2.0][]
- You can skip backing up Mongo, MySQL, or files by not specifying Mongo host, MySQL host, or file paths - Softlayer credentials are still required, and Sentry is still optional
1 parent 8eb2409 commit 811df17

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.2.0][]
8+
### Added
9+
- You can skip backing up Mongo, MySQL, or files by not specifying
10+
Mongo host, MySQL host, or file paths
11+
- Softlayer credentials are still required, and Sentry is still optional
12+
713
## [0.1.7][]
814
### Fixed
915
- Wait for backups to complete

gamora/docker-entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ log() {
88
}
99

1010
back_up_mongo() {
11+
if [[ -z "${MONGO_HOST:-}" ]]; then
12+
log "Skip backing up Mongo because no Mongo host specified"
13+
return
14+
fi
15+
1116
FILENAME=mongo_backup_$(date +"%Y%m%d_%H%M%S").archive.gzip
1217

1318
log "Taking mongo backup"
@@ -32,6 +37,11 @@ back_up_mongo() {
3237
}
3338

3439
back_up_mysql() {
40+
if [[ -z "${MYSQL_HOST:-}" ]]; then
41+
log "Skip backing up MySQL because no MySQL host specified"
42+
return
43+
fi
44+
3545
FILENAME=mysql_backup_$(date +"%Y%m%d_%H%M%S").archive.gzip
3646

3747
log "Taking mysql backup"
@@ -59,6 +69,11 @@ back_up_mysql() {
5969
}
6070

6171
back_up_files() {
72+
if [[ -z "${BACKUP_LOCAL_PATHS:-}" ]]; then
73+
log "Skip backing up files because no local paths specified"
74+
return
75+
fi
76+
6277
FILENAME=files_backup_$(date +"%Y%m%d_%H%M%S").archive.tgz
6378

6479
log "Taking file backup"

0 commit comments

Comments
 (0)