From 79661c6a32b1a61dfced820da1d3e75ac621ec91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 8 Jun 2016 11:55:22 +0200 Subject: [PATCH] Added script for backing up the live MongoDB. Assumes you have an SSH tunnel to cloudapi.blender.org with localhost:27018 forwarded to localhost-at-other-side:27017, like: ssh cloudapi.blender.org -L 27018:localhost:27017 --- .gitignore | 1 + backup-db.sh | 3 +++ 2 files changed, 4 insertions(+) create mode 100755 backup-db.sh diff --git a/.gitignore b/.gitignore index 66f35aee..eba6677a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /pillar/pillar.egg-info/ /pillar/google_app.json profile.stats +/dump/ diff --git a/backup-db.sh b/backup-db.sh new file mode 100755 index 00000000..66e15c9e --- /dev/null +++ b/backup-db.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mongodump -h localhost:27018 -d eve --out dump/$(date +'%Y-%m-%d-%H%M') --excludeCollection tokens