Archiving trac project environment into a zip file

The following small script dumps all usable information from a trac project directory, then creates a .zip archive in the actual working directory. The zip will contain all lists from trac, a dump of the wiki structure, and a hot copy of the project dir itself.

#!/bin/bash
#env
tmpdir=`mktemp -d`
tracdir=/var/lib/trac.project.directory/
#dumps
trac-admin "$tracdir" hotcopy "${tmpdir}/full_backup"
trac-admin "$tracdir" wiki dump "${tmpdir}/wiki_dump"
#lists
trac-admin "$tracdir" wiki list > $tmpdir/wiki_list.txt
trac-admin "$tracdir" permission list > $tmpdir/permission_list.txt
trac-admin "$tracdir" ticket_type list > $tmpdir/ticket_type_list.txt
trac-admin "$tracdir" priority list > $tmpdir/priority_list.txt
trac-admin "$tracdir" severity list > $tmpdir/severity_list.txt
trac-admin "$tracdir" component list > $tmpdir/component_list.txt
trac-admin "$tracdir" version list > $tmpdir/version_list.txt
trac-admin "$tracdir" milestone list > $tmpdir/milestone_list.txt
trac-admin "$tracdir" resolution list > $tmpdir/resolution_list.txt
#zip'em
currdir=`pwd`
pushd "$tmpdir"
zip -r "${currdir}/trac-"`date +%Y-%m-%d_%H%M`"-backup.zip" .
popd
rm -rf "$tmpdir"