From 3f397ff1575b79f74184302f3c3b8e549895f571 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Jan 2012 18:43:33 -0200 Subject: Adding backup/copy sites; restoration fixes --- share/hydractl/backup-copy-sites | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 share/hydractl/backup-copy-sites (limited to 'share/hydractl/backup-copy-sites') diff --git a/share/hydractl/backup-copy-sites b/share/hydractl/backup-copy-sites new file mode 100755 index 0000000..19b41d1 --- /dev/null +++ b/share/hydractl/backup-copy-sites @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copy multiple sites. +# + +# Basic parameters. +SERVER="$1" + +# Syntax check. +if [ -z "$SITE" ]; then + hydra_action_usage + exit 1 +fi + +# Determine sites to copy. +if [ -z "$2" ]; then + sites="`ls /var/sites`" +else + shift + sites="$*" +fi + +# Copy each site. +for site in $sites; do + hydractl backup-copy-site $SERVER $site +done -- cgit v1.2.3