HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   ISPConfig Backup Script (http://www.howtoforge.com/forums/showthread.php?t=40323)

vaio1 22nd October 2009 13:16

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.

falko 23rd October 2009 16:31

This is for Fedora/CentOS, right? A few paths are different on Debian/Ubuntu.

vaio1 23rd October 2009 17:33

yes it is.
we are using CentoS 5.2.

any suggestion?

falko 24th October 2009 13:39

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.

vaio1 24th October 2009 13:41

Infact I have CentOs.
The question is another: Have I forgot something to backup?

falko 25th October 2009 11:08

Yes, the web sites in /var/www.

vaio1 26th October 2009 08:29

I would like to move my server to the newer version of ISP Config3. Which are the files that have I save from the old ISP Config2 server to move to ISP Config3?

thanks

falko 27th October 2009 19:01

You cannot upgrade from ISPConfig 2 to 3. The setups are totally different.

vaio1 27th October 2009 19:54

Hi falko,

thanks for your reply is there a way to hide the upgrading from 2 to 3.0 to the users. I mean that all the parameters can remain the same to avoid the re-configuration of the clients?

thanks

falko 28th October 2009 16:02

It's not possible to upgrade from ISPConfig 2 to 3.


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

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