Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2.  
  3. WWW_ROOT="/var/www/html"
  4. BACKUP_ROOT="/home/foo/backup"
  5.  
  6. echo "rsync web pages..."
  7. for i in `ls -1d *`; do
  8.   cd $i
  9.   rsync -a . $BACKUP_ROOT/webpages/$i
  10.   git init
  11.   git add -A
  12.   git commit -am "Daily commit."
  13.   cd ..
  14. echo "/rsync web pages..."