You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,17 @@ Docker image with mongodump running as a cron task
5
5
6
6
### Usage
7
7
8
-
Attach a target mongo container to this container and mount a volume to container's `/data` folder. Backups will appear in this volume. Optionally set up cron job schedule (default is `0 12 * * *` - runs every day at 1:00 am).
8
+
Attach a target mongo container to this container and mount a volume to container's `/data` folder. Backups will appear in this volume. Optionally set up cron job schedule (default is `0 1 * * *` - runs every day at 1:00 am).
9
9
10
10
docker run -d \
11
11
-v /path/to/target/folder:/backup # where to put backups
12
-
-e 'CRON_SCHEDULE=0 12 * * *' # cron job schedule
12
+
-e 'CRON_SCHEDULE=0 1 * * *' # cron job schedule
13
13
--link my-mongo-container:mongo # linked container with running mongo
14
14
istepanov/mongodump
15
+
16
+
To run backup once without cron job, add `no-cron` parameter:
17
+
18
+
docker run --rm \
19
+
-v /path/to/target/folder:/backup # where to put backups
20
+
--link my-mongo-container:mongo # linked container with running mongo
0 commit comments