summaryrefslogtreecommitdiff
path: root/backup.sh
blob: e7afc560d5d7ea9a652fccfc1d918bba1debb85f (plain)
1
2
3
4
5
6
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