DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Old Ensim Backup Scripts

09.16.2005
| 1895 views |
  • submit to reddit
        backup

#!/bin/sh

echo $1
cd /home/virtual/$1/var/www
tar czfv /home/backups/$1.tar.gz cgi-bin html > /dev/null
chmod 777 /home/backups/$1.tar.gz
echo Backed up $1 to /home/backups/$1.tar.gz

backup-all

#!/bin/sh

rm -f /home/backups/old/*
mv /home/backups/*.gz /home/backups/old/
find -type l -maxdepth 1 -name '*.*' | xargs -n 1 basename | xargs -n 1 ./backup