Backup laptops#
Backups gaan met rsync van de 3 laptops naar de grafspee (hardware node) m.b.v. rsync.
Target directory is /var/lib/vz/backup/<sysname>. (/var/lib/vz is mountpoint met 100 GB}
Systemen zijn:
- bismarck claudia)
- gladiator (esther)
- interceptor (anneke)
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#
| user | uid |
|---|---|
| claudia | 1001 |
| esther | 500 |
| anneke | ? |
rsync proces#
rsync --recursive --exclude='/home/${USER}/.cache' --exclude='/home/${USER}/.config' --exclude='/home/${USER}/.java' /home/${USER} grafspee:/var/lib/vz/backup/bismarck
Exclude list#
Rsync is performed with an --exclude-from parameter. The file that holds the exclusions, is centrally managed here : RSYNCEXCLUDELIST
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/claudia/ grafspee:/var/lib/vz/backup/bismarck/home/claudia
rm $EXCLUDEFILE

