bash-scripts/yedekle-sistem.sh

34 lines
526 B
Bash
Raw Normal View History

2016-03-04 21:01:08 +02:00
#!/bin/bash
# Çrş 02 Mar 2016 20:32:16 EET CaylakPenguen
# sistem servis yedeklerini almak icin betik
# Lisans = GNU/GPL
#
DATADIR="/root/sistem"
DIZIN="$DATADIR/$(date +%F)"
yedekal(){
2016-04-29 22:47:10 +03:00
mkdir -p $DIZIN
cd $DIZIN
cp -r /etc/bind .
cp -r /etc/nginx .
cp -r /etc/supervisor .
cp -a /etc/aliases* .
cp -ar /etc/postfix .
cp -ar /etc/opendkim* .
cp -ar /var/log/apt apt-log
cp -ar /var/log/mail.* .
date > $(date +%F-%H-%M).txt
cd $DATADIR
tar -zcf $DIZIN.tar.gz $DIZIN
2016-03-04 21:01:08 +02:00
}
yedekle (){
2016-04-29 22:47:10 +03:00
yedekal
2016-03-04 21:01:08 +02:00
}
# ***
yedekle