summaryrefslogtreecommitdiff
path: root/backup.sh
diff options
context:
space:
mode:
authorWu Cheng-Han2015-06-01 18:04:25 +0800
committerWu Cheng-Han2015-06-01 18:04:25 +0800
commitf7f8c901f4bc39c3ed0a2bdfe1cbaa1ee6957999 (patch)
tree1bb09442906fa8e258c670c87491c64b6de27e68 /backup.sh
parent4e64583a0b6175d2c9a6729ffde1472dd55d389c (diff)
Marked as 0.2.9
Diffstat (limited to 'backup.sh')
-rw-r--r--backup.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/backup.sh b/backup.sh
new file mode 100644
index 00000000..e7afc560
--- /dev/null
+++ b/backup.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+path=./backups
+today=$(date +"%Y%m%d")
+timestamp=$(date +"%Y%m%d%H%M%S")
+mkdir -p $path/$today
+pg_dump hackmd > $path/$today/postgresql_$timestamp
+mongodump -d hackmd -o $path/$today/mongodb_$timestamp \ No newline at end of file