
26th July 2012, 20:41
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Migrate to new server
My server needs to be upgraded to Ubuntu 12.
What are the right steps to "easily" migrate to the new server?
(db's, data, mail, ispconfig etc)
|

8th August 2012, 14:11
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Pffff as a linux noob this is some job.....
For example on the old server I want to copy /var folder (using scp) to the new server keeping file permissions. I tried to copy them but access is denied because only root can copy these files?
I used
Quote:
|
scp -rp /var administrator@newserver:/var
|
Is this command correct?
How can I get root access to the new server to be able to copy the files to the new server?
|

9th August 2012, 14:56
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
On Ubuntu, you must enable the root account by setting a root password:
|

10th August 2012, 14:30
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Falko,
Did it but when trying to connect I get Permission denied.
Quote:
ssh root@myip
root@myip's password:
Permission denied, please try again.
|
|

10th August 2012, 14:34
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Changed "PermitRootLogin yes" in /etc/ssh/sshd_config and restarted ssh and it works now!
|

10th August 2012, 14:43
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
2nd question.
I want to copy the files from the old server to the new server. How should I do this? I want to keep the permissions and owners like it is on the old server.
|

13th August 2012, 11:48
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Quote:
Originally Posted by skoena
My server needs to be upgraded to Ubuntu 12.
What are the right steps to "easily" migrate to the new server?
(db's, data, mail, ispconfig etc)
|
There's a saying in Dutch (in my best English translation): I don't see the forrest because of all the trees.
Untill now it's not clear how to do a "good" migration to a new server. Is it an idea to create a sticky about this?
*I copied (with rsync) all the data from
/var/www
/etc
/var/log/ispconfig/httpd
/var/vmail
/var/lib/mysql
(databases were not available on new server when I did this, so I dumped the db's on the old server and copied them to the new server with:
Quote:
|
mysqldump --opt --user=root --password=xxxxxxxx --all-databases | gzip > mysql_backup.sql.gz
|
) For some reason the dbispconfig database was not imported so I imported it by hand via phpmyadmin.
Do I need to copy more or is this enough??
Is there anything I missed?
Last edited by till; 29th November 2012 at 08:26.
|

3rd September 2012, 11:43
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Till/Falko,
Idea to create write a sticky or howto how to backup a server running ispconfig and restoring it to a new server?
I now try to combine a lot of posts but still not clear what to do and which steps to do.
Rudolf.
Last edited by skoena; 3rd September 2012 at 11:46.
|

1st December 2012, 14:15
|
|
Senior Member
|
|
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 327
Thanks: 62
Thanked 9 Times in 8 Posts
|
|
Can somebody make a post explaining all the steps needed to copy all contents from 1 server to another server? (files, db's, changes to ispconfig files eg passwords etc etc)
Can somebody make a "howto"?
|

18th December 2012, 19:46
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,883
Thanks: 691
Thanked 4,187 Times in 3,204 Posts
|
|
Here the steps:
1) Backup the following directories on the old server: /var/www, /var/vmail and /etc, ensure that you preserve permissions e.g. with "tar pczf backupfile.tar.gz /directory/to/backup".
2) backup all mysql databases.
3) install ispconfig on the new server.
4) backup the new dbispconfig database and empty the database afterwards. Then restore the database of the old server.
5) copy all users and groups of the websites (users are web1, web2, ... , groups are client1, client2, ..., etc.) from the files /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow from the old server to the new server. Copy only the lines of the users and groups, not the whole files! and make a backup of the files before you change them.
6) restore the contents of /var/vmail and /var/www on the new server.
7) restore the databases of the clients
8) Login to ispconfig, go to tools > resync, check all checkboxes and click on start and wait a few minutes to let ispconfig write missing config files.
|
|
The Following 6 Users Say Thank You to till For This Useful Post:
|
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 16:29.
|
|
Recent comments
2 days 7 hours ago
2 days 16 hours ago
2 days 19 hours ago
2 days 20 hours ago
2 days 21 hours ago
2 days 23 hours ago
3 days 52 min ago
3 days 2 hours ago
3 days 18 hours ago
3 days 18 hours ago