Files
tareo-scripts/server/backup.sh

21 lines
384 B
Bash
Raw Normal View History

#!/bin/bash
# echo "0 11 * * * root /root/scripts/backup.sh" > /etc/cron.d/backup
BAKDIR=/root/backup/configsave
# List here all files/dirs which should be backupped
BAKS="/root/scripts
/etc/apache2/sites-available
/etc/samba/smb.conf \
/etc/apt-cacher-ng/acng.conf \
"
if [ ! -e $BAKDIR ]; then
mkdir -p $BAKDIR
fi
DATE=$(date +%y%m%d-%H%M)
tar cfvz $BAKDIR/"$DATE".tgz $BAKS