Skip to content

Commit efa48a0

Browse files
simplified conf flags and added better comments
1 parent 7eb31f3 commit efa48a0

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

scripts/docker-persistent.example.conf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
# 'log_dir' or 'backup.location' flags are auto-overriden
2-
# when using with scripts/docker-persistent.sh. Changes to
3-
# these flags will be ignored!
1+
# 'log_dir' and 'backup.location' flags are auto-overriden
2+
# when using with scripts/docker-persistent.sh. No need to
3+
# add them here.
44
production:
5-
host: 172.17.0.1
5+
host: mongodb01.example.com
66
port: 27017
7-
log_dir: /mongodb_consistent_backup/logs
87
backup:
98
method: mongodump
109
name: default
11-
location: /mongodb_consistent_backup/data
1210
archive:
1311
method: tar
1412
notify:

scripts/docker-persistent.sh

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,27 @@
44
# with persistent data container for data, config and logs.
55
#
66
# See: scripts/docker-persistent.example.conf for an example
7-
# config to pass to this script during backup. Make sure
8-
# 'log_dir' and 'backup.location' are not changed!
9-
7+
# config to pass to this script during backup. 'log_dir' and
8+
# 'backup.location' variables are auto-set by this script.
9+
#
10+
# Run backup:
11+
# $ scripts/docker-persistent.sh backup scripts/docker-persistent.example.conf
12+
# # Loading config file scripts/docker-persistent.example.conf into container
13+
# # Running Docker image: timvaillancourt/mongodb_consistent_backup:latest
14+
# [2017-04-27 11:22:04,255] [INFO] [MainProcess] [Main:init:127] Starting mongodb-consistent-backup version 1.0.0 (git commit: d780ad545b603d3a2f807e1813f1de407e81f1ba)
15+
# ...
16+
# ...
17+
#
18+
# List backups (in persistent Docker volume):
19+
# $ scripts/docker-persistent.sh list
20+
# /mongodb_consistent_backup/data/default/20170427_1122
21+
# /mongodb_consistent_backup/data/default/20170427_1123
22+
#
23+
# Get a backup:
24+
# $ scripts/docker-persistent.sh get /mongodb_consistent_backup/data/default/20170427_1122
25+
# $ ls -ald ./20170427_112
26+
# drwxr-xr-x. 3 root root 59 Apr 27 13:22 ./20170427_1122
27+
#
1028

1129
ACTION=$1
1230
[ -z $1 ] && echo "Usage: $0 [backup|list|get] [action flags]" && exit 1

0 commit comments

Comments
 (0)