Add backup export/import hooks for associated VHOST files

This commit is contained in:
Jose Diaz-Gonzalez
2014-12-11 02:38:08 -05:00
parent b4c864bea7
commit 1d45ca0cdd
2 changed files with 20 additions and 0 deletions

8
plugins/domains/backup-export Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
shopt -s nullglob
VERSION="$1"
BASE_DIR="$2"
cat; for i in $BASE_DIR/*/VHOST; do echo $i; done

12
plugins/domains/backup-import Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
shopt -s nullglob
VERSION="$1"
IMPORT_DIR="$2"
TARGET_DIR="$3"
cd $IMPORT_DIR
for file in */VHOST; do
cp $file "$TARGET_DIR/$file"
done