export PATH=$scriptsdir:$bindir:$PATH
# file locations and other values
+today=$(date +%Y%m%d%H%M%S)
datadir="/var/lib/backups"
tmpdir="/dev/shm/backups"
currentfiles="$tmpdir/files.db"
find-cmd.sh /home > $currentfiles
echo "Determining list of files to backup with lsbackups"
-cat $currentfiles | lsbackups > $backups 2>$statusfile
+{
+ # lsbackups expects the current date followed by a null before the list of files
+ printf "$today\0"
+ cat $currentfiles
+} | lsbackups > $backups 2>$statusfile
echo "Running rsync to pack the image"
cat $backups | rsync-cmd.sh $isomountdir