From fe8aa0a0a1e1dd1e558685bb5c6b6ffcc387c222 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 27 May 2019 23:15:45 -0300 Subject: WIP: take a backup during deployment Before possibly tearing down the machine, while all services are stopped (after the =docker-compose down= command), create a new backup with the current data. The backup tag should include the commit SHA of the deployment. --- backup-and-shutdown.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 backup-and-shutdown.sh (limited to 'backup-and-shutdown.sh') diff --git a/backup-and-shutdown.sh b/backup-and-shutdown.sh new file mode 100755 index 0000000..c880a16 --- /dev/null +++ b/backup-and-shutdown.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -Eeuo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" + +echo "FIXME: get current backup" +echo docker-compose down +echo "FIXME: create a new backup" +echo "FIXME: rsync back new backup" -- cgit v1.3