Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Save the Children

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 69 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

Linux Knowledge Base and Tutorial: Forums

Linux Tutorial :: View topic - Moving mail server to a new hardware
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Moving mail server to a new hardware

Post new topic   Reply to topic    Linux Tutorial Forum Index -> How To
View previous topic :: View next topic  
Author Message

Joined: Sep 12, 2005
Posts: 224
Location: Belgium

PostPosted: Thu Sep 28, 2006 9:16 pm    Post subject: Reply with quote

we have recently bought a new server... so we decided to replace the old one...
Does not really sound like good planning - one would expect it the other way around. Smile

Here are a few suggestions. I suppose you'll be able to put them in the right order and adapt them to your situation. I recommend you test these steps before you do it for real. I did not test any of them.

assuming your mailboxes are files or directories : [b]rsync[/b] is great to copy files and directories between servers and preserve permissions and ownership. It has options to use numeric id's in stead of account names. man rsync or http://samba.anu.edu.au/ftp/rsync/rsync.html .

I would expect that copying the config files (from /etc/...) for your sendmail and webmail to the new machine would be sufficient to recreate their configuration on the new machine. If you actually copy the files, checking their permissions and ownership may be a good idea.

If you need identical user accounts on your new machines as on the old, i'd try copying the relevant lines from /etc/passwd and /etc/shadow. I think that should be sufficient to create user accounts with exactly the same properties (including UID).
I wouldn't copy the complete passwd and shadow file asd this might alter UIDs and maybe passwords for root and service accounts - that would really mess things up.

copying /etc/groups should take care of group membership.

home directories for users can be copied wih rsync, same as 1/, if required.

If 3/ doesn't work (I've read that passwd and shadow file can get corrupted if you edit them directly in stead of using the appropriate tools) you'd have to collect all relevant user account information from the old machine, and write it to text files that you can use on the new machine to create new accounts with identical properties to the old.

What I have in mind is
useradd with options to controll UID and group membership, possibly also set passwords
id (eg "id -u [i]username[/i] " to get UID's of user accounts
cat, grep, awk and sed to manipulate lists and other text files
that, and some pipes or loops to glue everything together

Good luck & have fun.[[/i]
Back to top
View user's profile Send private message

Joined: Sep 12, 2005
Posts: 224
Location: Belgium

PostPosted: Fri Sep 29, 2006 1:40 pm    Post subject: Reply with quote

nonetheless, freeloader is right:
copying config files is quick and easy but sometimes the format and content of a config file can vary between different versions of the same application - espessially with 'major' version changes.

The underlying assumption of my approach (which i forgot to mention) is that the software on both machines is identical, so either
- you've installed the same version on the new machine as you have running on the old machine, or
- preferably, you upgrade the software on the old machine to the version you want to use on the new machine, following the manufacturer/maintainer's upgrade guidelines, and test it. All this before you start migrating.

IMO you could try copying configs between versions, if you can verify (test !) that the result is stable and works as expected.

Of course, if the config has no effect on the mailboxes at all, and you only need to move the mailboxes, this is of no concern.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Linux Tutorial Forum Index -> How To All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001-2007 phpBB Group



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds