wok-6.x diff mirror-tools/stuff/home/backups/mirror/backup.sh @ rev 8420
Add xorg-util-macros to xorg-xineramaproto depends and build depends.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Feb 05 17:50:20 2011 +0000 (2011-02-05) |
parents | 872280fb02fc |
children |
line diff
1.1 --- a/mirror-tools/stuff/home/backups/mirror/backup.sh Wed Jun 02 10:53:28 2010 +0200 1.2 +++ b/mirror-tools/stuff/home/backups/mirror/backup.sh Sat Feb 05 17:50:20 2011 +0000 1.3 @@ -7,12 +7,19 @@ 1.4 1.5 backup_data() 1.6 { 1.7 +GZIP=rgzip 1.8 +which $GZIP > /dev/null || GZIP=gzip 1.9 +echo "Sync doc.slitaz.org ..." 1.10 +rsync -aH -e "$SSH" --bwlimit=50 \ 1.11 + $REMOTE_USER@tank.slitaz.org:/home/slitaz/www/doc/data/. /var/www/doc/data/. 1.12 while read file dirs; do 1.13 + echo "Create $file.cpio.gz ..." 1.14 ( cd / ; find $dirs | cpio -o -H newc ) | \ 1.15 - rgzip -9 > $file.cpio.gz 2> /dev/null 1.16 + $GZIP -9 > $file.cpio.gz 2> /dev/null 1.17 done <<EOT 1.18 etc etc home/$BACKUP_USER/.ssh 1.19 www var/www/mirror-info var/www/pizza 1.20 +www2 var/www/boot /var/www/hg /var/www/pkgs /var/www/doc 1.21 packages var/lib/tazpkg/installed 1.22 rrd var/spool/rrd 1.23 crontabs var/spool/cron/crontabs 1.24 @@ -24,11 +31,12 @@ 1.25 # The following should be kept untouched. 1.26 # 1.27 1.28 -SSH="ssh -i /home/$BACKUP_USER/.ssh/id_rsa" 1.29 +SSH="ssh -i /home/$BACKUP_USER/.ssh/id_rsa -o PasswordAuthentication=no" 1.30 1.31 cd $(dirname $0) 1.32 [ $(id -u) == 0 ] || exit 1 1.33 -[ $(hostname) == $(basename $PWD) ] || exit 1 1.34 +[ $(hostname) == $(basename $PWD) -o \ 1.35 + $(hostname) == $(basename $PWD).slitaz.org ] || exit 1 1.36 1.37 rotate() 1.38 { 1.39 @@ -62,12 +70,14 @@ 1.40 done 1.41 fi 1.42 1.43 +echo "Local backup for $(hostname) ..." 1.44 backup_data 1.45 1.46 chown $BACKUP_USER * 1.47 chmod 700 * 1.48 1.49 [ -n "$REMOTE_USER" ] && for i in $(cd .. ; ls); do 1.50 - [ $i == $(hostname) ] && continue 1.51 + [ $i == $(hostname) -o $i.slitaz.org == $(hostname) ] && continue 1.52 + echo "Get backups from $i ..." 1.53 rsync -aH -e "$SSH" --bwlimit=50 $REMOTE_USER@$i.slitaz.org:/home/backups/$i/. ../$i/. 1.54 done