Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 22nd October 2009, 14: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?

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
Reply With Quote
The Following User Says Thank You to vaio1 For This Useful Post:
falko (23rd October 2009)
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to manage a backup mail server with ISPConfig 3? voltron81 HOWTO-Related Questions 3 3rd September 2009 11:08
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 09:51
Upgrade failed, no ISPconfig, no backup... gauthier Installation/Configuration 4 19th April 2008 20:21
[SHELL Script] - Backup WEB & DATABASES vaio1 Tips/Tricks/Mods 0 5th September 2007 15:48
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 16:16

All times are GMT +2. The time now is 22:19.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.