Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (25 sloc) 865 Bytes
#!/bin/sh
# Back Up Everything in the Current Directory Except "media" and "other" to
# the "backups" Directory
# Written in 2012 by 伴上段
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
. config.txt
cleanup() {
rm -f $manifest
}
intcleanup() {
rm -f $manifest $archivename
}
trap cleanup EXIT
trap intcleanup INT
archivename=backups/`$BACKUPDATE`.cards.tar.bz2
manifest=`mktemp backupall.$$.XXXXXXX.files`
find . | egrep -v "$BACKUPEXCLUSION" >$manifest
tar cv --no-recursion -T $manifest | bzip2 -9 >$archivename