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 19th October 2005, 13:30
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default Backing up and restoring

Ok is there a way to make a backup of customer account data, ie all of them from one server. Install and configure a new server and then import the customer account details into the new one. This way I dont lose any passwords ect.. that the customer creates if I decide to get a new and faster server to use as my hosting server.

Am I making sense.....

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 19th October 2005, 15:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

This might give you an idea how to start:

Quote:
What is the best way to install an ISPConfig-Update?

Normally an ISPConfig-Update does not cause any problems. Since ISPConfig is installed on a multitude of different systems and because we have heard of sporadic problems with updates which we could not reproduce in spite of testing intensively, we publish some tips/hints here that should prevent a failed update to paralyse your system.

Please note: Placeholders are indicated by square brackets [ ].

1) First make a backup of your existing (working) ISPConfig installation:

Open a root shell (under Windows you can use PuTTY ( http://www.chiark.greenend.org.uk/~s.../download.html ) for this task).

cd /root/
tar -pczf root_ispconfig_old.tar.gz ispconfig/
cd /home/
tar -pczf home_admispconfig_old.tar.gz admispconfig/

If your MySQL database is protected by a password:

mysqldump -h [name of your server, e.g. localhost] -u [database user, e.g. root] -p[database password] -c --add-drop-table --add-locks --all --quick --lock-tables [name of the ISPConfig database] > existing_db.sql (no space character between -p and password!)

Otherwise:

mysqldump -h [name of your server, e.g. localhost] -u [database user, e.g. root] -c --add-drop-table --add-locks --all --quick --lock-tables [name of the ISPConfig database] > existing_db.sql

Save /etc/passwd, /etc/shadow and /etc/group.

Save /etc/init.d/ispconfig_server and (if existing) /etc/init.d/ispconfig_tcpserver.

You should transfer the files named above(existing_db.sql, /etc/passwd, /etc/shadow, /etc/group, /etc/init.d/ispconfig_server, /etc/init.d/ispconfig_tcpserver) to your workstation (e.g. with WinSCP: http://winscp.sourceforge.net/eng/ ).

2) Install the ISPConfig-Update (see here). Do not close your root shell immediately after the update (also do not close your WinSCP window)!

Open a second root shell and check if the root login still works! If it does not you can restore the root user in the root shell you have left open (e.g. by editing /etc/passwd and /etc/shadow or by playing back your backups of these two files via the open WinSCP window). Please take care that these files keep the same privileges as before!

3) Open the ISPConfig system in a browser and make a change (e.g. change a user's settings). After approx. 30 sec. you can check if the root login still works on the shell. If it does, you can undo the user settings change in the ISPConfig system and close all shells/WinSCP windows. Your ISPConfig update has been installed successfully!

4) If you realise with hindsight that the root login does not work on the shell you have the following possibilities to rescue your system (it is in no way necessary to format the system's hard disk and install a new system!):

4.1) If webmin ( http://www.webmin.com/ ) is installed as tar.gz (not rpm!), you can still login to webmin and fix the root user.

4.2) Boot your system from a Rescue-CD (e.g. http://sourceforge.net/projects/rescuecd/ ).

Login: root Password: rescue

Adjust your keyboard:

kbdmap

Mount the /-partition of your hard disk (mostly /dev/hda1):

mount -t [your filesystem, e.g. ext2|ext3|reiserfs|etc.] /dev/hda1 /mnt
chroot /mnt

Now you can find the passwd and shadow file under /etc and edit them in an editor (e.g. vi) or with programs like usermod. Repair your root user and reboot the system (do not forget ot remove the Rescue-CD from your CD-ROM):

shutdown -r now

4.3) If your server has a rescue mode (like the 1&1-Root-Server):

Boot your server into the rescue mode.

Mount the /-partition of your hard disk (mostly /dev/hda1):

mount -t [your filesystem, e.g. ext2|ext3|reiserfs|etc.] /dev/hda1 /mnt
chroot /mnt

Now you can find the passwd and shadow file under /etc and edit them in an editor (e.g. vi) or with programs like usermod. Repair your root user and reboot the system.

shutdown -r now

5) If you want to restore your old ISPConfig system, please do the following steps:

/etc/init.d/ispconfig_server stop
cd /root/
mv ispconfig/ ispconfig_new/
tar xvfz root_ispconfig_old.tar.gz
cd /home/
mv admispconfig/ admispconfig_new/
tar xvfz home_admispconfig_old.tar.gz

If your MySQL database is protected by a password:

mysql -h [name of your server, e.g. localhost] -u [database user, e.g. root] -p[database password] [name of the ISPConfig database] < existing_db.sql (no space character between -p and password!)

Otherwise:

mysql -h [name of your server, e.g. localhost] -u [database user, e.g. root] [name of the ISPConfig database] < existing_db.sql

Restore /etc/init.d/ispconfig_server (and /etc/init.d/ispconfig_tcpserver, where applicable) (e.g. by using WinSCP).

chmod 744 /etc/init.d/ispconfig_server
chmod 744 /etc/init.d/ispconfig_tcpserver (if existing)
/etc/init.d/ispconfig_server start
BTW, I'd also backup the /etc folder, your Postfix configuration, your Apache configuration, the BIND configuration, ftp configuration and restore them on the new system.
__________________
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 19th October 2005, 16:06
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default

Well... its not easy but that looks as though it will work. Thanks for that, hopefully I will never need it.

Thanks again
Reply With Quote
  #4  
Old 21st March 2006, 05:34
nenad nenad is offline
Senior Member
 
Join Date: Nov 2005
Location: Novi Sad, Serbia
Posts: 416
Thanks: 13
Thanked 5 Times in 5 Posts
Default

What's the purpose of built-in backup in ISPConfig?
It creates zip files which can be downloaded, but how they can be restored?

Management --> ISPConfigDatabase --> Backup Data
and
Tools & Options --> Backup Manager --> Backup

But how to restore them through ISPConfig web interface?
__________________
Nenad Bulatovic
---------------
Debian Lenny & ISPConfig 3
Reply With Quote
  #5  
Old 21st March 2006, 12:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Quote:
Originally Posted by nenad
What's the purpose of built-in backup in ISPConfig?
It creates zip files which can be downloaded, but how they can be restored?

Management --> ISPConfigDatabase --> Backup Data
Thats a database dump of the ISPConfig mySQL DB.

Quote:
Tools & Options --> Backup Manager --> Backup
Backup of websites.

Quote:
But how to restore them through ISPConfig web interface?
You can restore them only by FTP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 12th August 2006, 16:57
willcee willcee is offline
Junior Member
 
Join Date: Nov 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi you all,

i need to replace my server by another, so i need to backup ispconfig system, user datas, databases, and the webfolders of the users.

but i think i also need to backup the system users created by ispconfig?
should they have the same UID as on the old system?

cheers willcee
Reply With Quote
  #7  
Old 13th August 2006, 20:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Have a look here: http://www.howtoforge.com/forums/sho...ving+ispconfig
__________________
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


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


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