summaryrefslogtreecommitdiff
path: root/backup.sh
diff options
context:
space:
mode:
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