#!/bin/bash storebackup(){ tar -C /mnt -c $1 | tee >( sha1sum | sed -e "s/-/$2/" >> hactar.sha1 ) | tstore hactar.tstore $2 } cd /mnt/raid/backups ( export TSTORE=abcdefghijklmnopqrstuvwxyz export PATH=$PATH:/usr/local/bin # killall -STOP mozilla-bin ls -l hactar.tstore # tar -C /mnt -c sys | tstore hactar.tstore hactar.$(date +%s).tar storebackup sys hactar.$(date +%s).tar ls -l hactar.tstore # tar -C /mnt -c home | tstore hactar.tstore home.$(date +%s).tar storebackup home home.$(date +%s).tar ls -l hactar.tstore umount hactar && ( umount hactar mount -t tstore /mnt/raid/backups/hactar{.tstore,} -o ro,loop ) ) >>hactar.log 2>&1