Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- dir=/mnt/backup
- for i in `cat /proc/mounts | cut -d' ' -f2|grep $dir`; do
- if [ $? -eq 0 ]; then
- tar -zcvf $dir/squid.tar.gz /etc/squid3 /etc/squid /usr/lib/cgi-bin /var/lib/squidguard/db /etc/logrotate.d/squid3
- tar -zcvf $dir/apache.tar.gz /etc/apache2
- tar -zcvf $dir/root.tar.gz /root
- dpkg --get-selections > $dir/packages.txt
- crontab -l > $dir/crontab.txt
- exit
- fi
- done
Add Comment
Please, Sign In to add comment