Moving sites from server A to B
IS it possible to move individual site from one server A to another server B. If found some topics on this forum saying this can be done by coping /www ,/etc/passwd etc. Export / Import db_ispconfig
But this is not what i want. On server B existing sites (which don't exist a A get mixed up, different web numbering etc.) Is there a way to export (backup) a site en then to import (restore) this site on different machine ?
May thanks in advance,
The best way would be to create the site on server B with ISPConfig (including all email accounts) and then copy over all web site files, databases, etc.
I can see at least one issue in this solution :
if you have 3 websites www1 , www3, www4, (www2 was removed) how will you do that in the new server ? You will have to add and delete the sites as in the first server in order your users e.t.c. to match
My point is that on server 1 we have domain 1 and web1_user1 and this has to match exactly to server 2.
I believe that a "simple" solution that will export Everything (www, users, emails, log e.t.c) will be a very popular feature. Can someone provide such a script ? It should backup the users from shadow file, smtp configuration, http configuration e.t.c
Also i tried to backup a website but the www folder is quite large? I stopped the file download but i can not find the back up file on my server ... Is it automatically deleted ?
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 " ISPCONFIG BACKUP";
echo "setting paths";
echo "Wait a moment please...";
echo "1. Make a backup of /var/spool/mail";
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";
-u$USER -p$PASSWORD -h$HOST \
-Q -c -C --add-locks --quick --lock-tables \
--all-databases | gzip --best -c > $ISPCONFIG/mysql.sql.gz;
echo "12. Copy www folder";
tar -czf $ISPCONFIG/www.tar.gz www
echo "Restart Postfix"
Everybody much thxs for the fast replies. Reading those i've concluded that the best way to go is to make a new site on B en then copying a site from A to B (databases / users / www etc) following the instructions of Falko. Unfortunatly a lot of work in my case. So in my opinion it still would be a very nice feature to be able to import / export complete sites ;-) Another nice feature / partly repacing above one, is to be able to set
webnumer while creating new site. Pe. I want www.mysite.nl to be under www/web5. Normally ispconfig take the first "free" number and filling a kind of links in the maindb with this one. Changing this afterwards of filesystemlevel won't be a ood idea because making changes to other config will cause isp to reread maindatabase and changing vhosts_ispconfig accordangly , thus messing everything up.
|All times are GMT +2. The time now is 03:35.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.