blob: 4d7ff3635bcd076534afa9375ab9ef4af2611825 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# TODO: Make default .tar with optional bup
function tar_create_backup() {
ARCHNAME="backup/$WORLD_NAME-backup_`date +%d-%m-%y-%T`.tar.gz"
tar -czf "$ARCHNAME" "./$WORLD_NAME"
if [ ! $? -eq 0 ]
then
echo "TAR failed. No Backup created."
rm $ARCHNAME #remove (probably faulty) archive
return 1
else
echo $ARCHNAME created.
fi
}
|