#!/bin/sh # DO NOT EDIT - This file is being maintained by Chef T=$(mktemp -d -t -p /var/tmp otrs.XXXXXXXXXX) D=$(date +%Y-%m-%d) B=otrs-$D.tar.gz mkdir $T/otrs-$D chown otrs $T chown otrs $T/otrs-$D sudo -u otrs pg_dump --file=$T/otrs-$D/otrs.dmp otrs ln -s /var/lib/otrs $T/otrs-$D/otrs-var ln -s /etc/apache2/sites-available/otrs.openstreetmap.org.conf $T/otrs-$D/apache2-otrs.openstreetmap.org.conf export RSYNC_RSH="ssh -ax" nice tar --create --dereference --directory=$T otrs-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T