diff --git a/scripts/pre-backup b/scripts/pre-backup
new file mode 100755
index 0000000000000000000000000000000000000000..d10d5273797e989c3c01be66b8a75e88fd836924
--- /dev/null
+++ b/scripts/pre-backup
@@ -0,0 +1,5 @@
+#!/bin/bash -eux
+URL=${PWD##*/}
+db_container_name=`echo ${URL}_db_1 | sed "s/\.//g" | sed "s/-//g"`; \
+
+docker exec $db_container_name bash -c 'pg_dumpall -U postgres' > ./data/dump.sql