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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #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
The Following User Says Thank You to vaio1 For This Useful Post:
falko (23rd October 2009)
Sponsored Links
  #2  
Old 23rd October 2009, 16:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

This is for Fedora/CentOS, right? A few paths are different on Debian/Ubuntu.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd October 2009, 17:33
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

yes it is.
we are using CentoS 5.2.

any suggestion?
Reply With Quote
  #4  
Old 24th October 2009, 13:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

For CentOS and Fedora, your script looks good. On Debian and Ubuntu, the paths to Vhosts_ispconfig.conf and named.conf are a bit different.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 24th October 2009, 13:41
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Infact I have CentOs.
The question is another: Have I forgot something to backup?
Reply With Quote
  #6  
Old 25th October 2009, 11:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Yes, the web sites in /var/www.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

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 10:08
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 08:51
Upgrade failed, no ISPconfig, no backup... gauthier Installation/Configuration 4 19th April 2008 19:21
[SHELL Script] - Backup WEB & DATABASES vaio1 Tips/Tricks/Mods 0 5th September 2007 14:48
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16


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


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