Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 53 lines (44 sloc) 929 Bytes
# Exit on errors
trap 'fail' ERR
fail () {
echo "Failed with exit code $code"
exit 1
date="$(date --iso-8601)"
base="$date-$(basename $0)"
dir=$(mktemp -d --tmpdir=$HOME/tmp "$base-XXXX")
test -n "$dir" || exit 1
echo "Backing up in in $dir"
rm -rfv $dir
git clone dc01dev-06:/home/aearnfjord/src.private/backup $dir
cd $dir
# Remove stuff that was removed on our end
git rm -r *
# back up bitlbee settings
mkdir bitlbee
cd bitlbee
cp /var/lib/bitlbee/avar.xml .
# back up icedove mailbox + settings
mkdir icedove
cd icedove
rsync -av --progress ~avar/.icedove/ .
# back up irssi settings + logs
mkdir irssi
cd irssi
rsync -av --progress ~avar/.irssi/ .
git config
git add .
git commit -m"Automated backup of snth"
git tag $date
git push
git push --tags
echo "Backed up to $dir and transferred it to dc01dev-06"
rm -rfv $dir