Files
tareo-scripts/server/backup.sh

26 lines
521 B
Bash
Raw Normal View History

#!/bin/bash
# echo "0 11 * * * root /root/scripts/server/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 \
2015-06-24 13:35:52 +03:00
/etc/dnsmasq.conf \
/etc/ssh/sshd_config \
/etc/NetworkManager/system-connections/eth0 \
/etc/hosts \
/etc/apache2/apache2.conf \
"
if [ ! -e $BAKDIR ]; then
mkdir -p $BAKDIR
fi
DATE=$(date +%y%m%d-%H%M)
tar cfvz $BAKDIR/"$DATE".tgz $BAKS