rename again
This commit is contained in:
24
server/back-cfg.sh
Executable file
24
server/back-cfg.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# echo "0 11 * * * root /root/scripts/server/back-cfg.sh" > /etc/cron.d/back-cfg
|
||||
|
||||
BAKDIR=/root/backup/cfg
|
||||
|
||||
# List here all files/dirs which should be backupped
|
||||
BAKS="/etc/apache2/sites-available \
|
||||
/etc/samba/smb.conf \
|
||||
/etc/apt-cacher-ng/acng.conf \
|
||||
/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
|
||||
Reference in New Issue
Block a user