compose-website/utils/migrate
2016-02-11 10:17:57 +00:00

17 lines
345 B
Bash
Executable file

#!/bin/bash -eux
source /etc/environment
from=$1
domain=$2
ssh core@$from sudo /data/indiehosters/utils/stop_before_migration.sh $domain $IP
mkdir /data/domains/$domain
scp core@${from}:${domain}.tgz /data/domains/$domain
cd /data/domains/$domain
tar xvzf ${domain}.tgz
rm ${domain}.tgz
systemctl start u@$domain
systemctl enable u@$domain