wiki'd

by JoKeru

Linux BackUp Script

/root/backup/cfg
[cc lang='bash']
named /etc/named.conf /var/named/jokeru.ro
postfix /etc/postfix/conf/
dkim /etc/mail/dkim-milter/dkim-filter.conf
[/cc]

/root/backup/run.sh
[cc lang='bash']
#!/bin/bash
host='wiki'
here='/root/backup/'

cd \$here
while read line
do
name=`echo \$line | awk '{print \$1}'`
path=`echo \$line | sed "s/\^\$name//"`
tar -czf \$name.tgz \$path
done \< cfg
tar -czf config.tgz *.tgz
rsync -av config.tgz backup.jokeru.ro::\$host.jokeru.ro/config/`date +%Y-%m-%d`.tgz
rm -fr *.tgz
[/cc]

Comments