View Single Post
Old 2nd December 2009, 21:35
sygram sygram is offline
Senior Member
Join Date: Jan 2007
Posts: 101
Thanks: 10
Thanked 2 Times in 2 Posts

Hi again,

i found out this nice post from mturillo :

in case of centos / fedora i have modified the script to a) include www folder and b) backup entire mysql d, not only isp_config database . Please check below and correct if i have made any mistakes on my modifications.

Hope this helps someone.

echo "";
echo "************************************";
echo "************************************";
echo "";

echo "setting paths";

echo "Wait a moment please...";

echo "1. Make a backup of /var/spool/mail";
/etc/init.d/postfix stop
cd /var/spool
tar -czf $ISPCONFIG/mail.tar.gz mail

echo "2. Copy the passwd file";
cp /etc/passwd $ISPCONFIG

echo "3. Copy the shadow file";
cp /etc/shadow $ISPCONFIG

echo "4. Copy the group files";
cp /etc/group $ISPCONFIG

echo "5. Copy the Vhosts_ispconfig.conf file";
cp /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf $ISPCONFIG

echo "6. Copy the local-host-names file";
cp /etc/postfix/local-host-names $ISPCONFIG

echo "7. Copy the postfix/virtusertable file";
cp /etc/postfix/virtusertable $ISPCONFIG

echo "8. Copy the named.conf file";
cp /var/named/chroot/etc/named.conf $ISPCONFIG

echo "9. Copy the proftpd.conf file";
cp /etc/proftpd.conf $ISPCONFIG

echo "10. Copy the proftpd_ispconfig.conf file";
cp /etc/proftpd_ispconfig.conf $ISPCONFIG

echo "11. Backup Mysql Database";
mysqldump \
-Q -c -C --add-locks --quick --lock-tables \
--all-databases | gzip --best -c > $ISPCONFIG/mysql.sql.gz;

echo "12. Copy www folder";
cd /var/
tar -czf $ISPCONFIG/www.tar.gz www

echo "Restart Postfix"
/etc/init.d/postfix start
Reply With Quote