#1  
Old 1st December 2009, 14:16
verhoem verhoem is offline
Junior Member
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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,

Marcel
Reply With Quote
Sponsored Links
  #2  
Old 2nd December 2009, 15:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

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.
__________________
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 2nd December 2009, 19:43
sygram sygram is offline
Senior Member
 
Join Date: Jan 2007
Posts: 101
Thanks: 10
Thanked 2 Times in 2 Posts
Default

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 ?

Regards,

Leon
Reply With Quote
  #4  
Old 2nd December 2009, 20:35
sygram sygram is offline
Senior Member
 
Join Date: Jan 2007
Posts: 101
Thanks: 10
Thanked 2 Times in 2 Posts
Default

Hi again,

i found out this nice post from mturillo :

http://how2forge.org/forums/showthread.php?t=40323

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 "";
echo "************************************";
echo " ISPCONFIG BACKUP";
echo "************************************";
echo "";

echo "setting paths";
ISPCONFIG=/backup/dec09
USER=root
PASSWORD=mypass
HOST=localhost

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 Mysql Database";
mysqldump \
-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";
cd /var/
tar -czf $ISPCONFIG/www.tar.gz www

echo "Restart Postfix"
/etc/init.d/postfix start
Reply With Quote
  #5  
Old 3rd December 2009, 08:54
verhoem verhoem is offline
Junior Member
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Thxs

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.
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
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04 c4rdinal HOWTO-Related Questions 112 23rd August 2011 10:49
Apache LoadBalanced, Ldirector. eterzella HOWTO-Related Questions 6 7th February 2009 15:43
Connection dropped by IMAP server gublym Server Operation 5 23rd January 2009 09:47
Can't start apache Musty Server Operation 12 9th March 2008 13:58
Public and private network + High Availability Apache Cluster teleted HOWTO-Related Questions 11 28th January 2008 14:29


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


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