aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/backup-copy-sites
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl/backup-copy-sites')
-rwxr-xr-xshare/hydractl/backup-copy-sites26
1 files changed, 26 insertions, 0 deletions
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