View Single Post
  #1  
Old 22nd October 2009, 13:16
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Question ISPConfig Backup Script

Hi guys,

I have created this little script to backup all the important files. Have I forgot something?

Code:
echo "";
echo "************************************";
echo "       ISPCONFIG BACKUP";
echo "************************************";
echo "";

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 of the ISPConfig Databse";
mysqldump \
        -u$USER -p$PASSWORD -h$HOST \
        -Q -c -C --add-drop-table --add-locks --quick --lock-tables \
        db_ispconfig | gzip --best -c > $ISPCONFIG/db_ispconfig.sql.gz;


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