Last active
December 27, 2015 13:38
-
-
Save EmmanuelKasper/7334239 to your computer and use it in GitHub Desktop.
Simple backup of all Virtual Hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ -d /var/backups/vhosts ] || mkdir /var/backups/vhosts | |
VHOST_DIR=/srv/www/ | |
cd $VHOST_DIR | |
for VHOST in *; do | |
if [ "$VHOST" != "basebox.libera.cc" ]; then | |
tar cpzf /var/backups/vhosts/$VHOST.tar.gz $VHOST | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment