Backup laptops#

Backups go with rsync from the 3 laptops to grafspee (hardware node) with rsync.

Target directory is /var/lib/vz/backup/<user>. (/var/lib/vz is mountpoint with 100 GB}

Inrichting#

  • grafspee
    • useradd --home /home/claudia --gid 1001 --create-home --uid 1001 --shell /bin/bash claudia
    • passwd claudia
  • bismarck:
    • ssh-keygen
    • ssh-copy-id grafspee

Unique uid's#

useruid
claudia1001
esther500
anneke?

Exclude list#

Rsync is performed with an --exclude-from parameter. The file that holds the exclusions, is centrally managed here : RSYNCEXCLUDELIST

Rsync execution#

The script is like this :

#!/bin/bash
#
#  backup with rsync to another host
EXCLUDEFILE=`mktemp`
wget --quiet -O - 'http://www.computerhok.nl/JSPWiki/Wiki.jsp?page=RSYNCEXCLUDELIST'|grep EXCLUDEPATTERN | cut -d" " -f2 > $EXCLUDEFILE
echo "excluding following patterns:" `cat ${EXCLUDEFILE}`
rsync --verbose --recursive --exclude-from=${EXCLUDEFILE} /home/${USER}/ grafspee:/var/lib/vz/backup/${USER}/home/${USER}
rm $EXCLUDEFILE