Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Gotchas when migrating users to a new Linux server?

Posted on 2007-11-28
6
Medium Priority
?
517 Views
Last Modified: 2013-12-16
Hello all --

I am replacing a server we have in work with a new one I built.  The current server is running Fedora Core 6, and the newly-built server is running Fedora 8.  The current server is primarily acting as a fileserver via Samba, allowing centralized folders for all the WinXP machines in the lab, and each of these XP machines is backed up to the server every night.

Anyway, I've never transferred user settings (et. al) from one server to an entirely different one.  Also, I'm not proud, so I'll ask -- are there any "gotchas" I should be aware of when I undertake this move?

There are instructions at http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/ that look fairily comprehensive, and I know I'll need to transfer Samba users and the samba.conf file.  I'm also planning on using rsync to copy the /home directories from the old server to the new server via the network, so if there are any of the myriad rsync switches I should use or avoid, I'd appreciate the heads-up.

Basically, never having done this before, I'm trying to avoid the forehead-slapping moment when I realize I've forgotten something...

Thanks for all advice.
0
Comment
Question by:mjcoyne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 14

Expert Comment

by:arrkerr1024
ID: 20377490
Nope, no gotchas - at least not for what you're doing.  Thats one of the beautiful things about linux/unix.  Just make sure that you copy the /etc/shadow, /etc/passwd, and /etc/group files over as outlined in that web page - excluding the system accounts.  Then just "rsync -a", the archive, -a, flag will preserve everything for you - make sure you use it.   You could also use -z to compress data if you want.

BTW, you might want to think about using CentOS-5 instead of Fedora.  It stays current for a lot longer, so you don't have to do these upgrades just to keep getting updates.  If you don't know, CentOS is just a free re-build of RedHat Enterprise.  Since they try to keep it stable and don't upgrade major versions of things it can get out of date, especially for graphical things, but for servers thats what you want.
0
 
LVL 17

Author Comment

by:mjcoyne
ID: 20379688
I considered switching to CentOS; I was aware of it.  It actually would be the sensible move, considering this is a working server and stabilty should be a priority goal, but I've got Fedora on my server at home, and I'm comfortable with it.  Plus, I'm a bit of a hacker, and I like things bleeding edge...:).

As for rsync,  the archive switch doesn't create an "archive" (similar to tar or gzip) does it?  I'm just trying to recreate the files on the new machine faithfully and ready for immediate use.  Ideally, I'd like to do the rsync transfer and pull the plug on the old machine.

Does the compression flag with rsync just save bandwith on the transfer, or is it for creating an archive (for lack of a better term), again like compression utilities?

Will SELinux file labeling be preserved with the rsync transfer, or will I need to relabel the new machine?

Final question on the rsync transfer -- is it better to run rsync on the new machine, and "pull" the files over, or run it on the old machine, and "push" the files to the new machine?

Thanks for your help...
0
 
LVL 14

Accepted Solution

by:
arrkerr1024 earned 2000 total points
ID: 20385394
The archive switch means "preserver everything", like you're making an archive in the more conceptual sense - it doesn't mean make something like a tarball.

As far as comfort, thats the nice thing about fedora and redhat/centos, fedora is just the test bed for redhat - so they're almost identical except for newer packages in fedora - the installer is the same, package names are the same, etc.

The compression flag just compresses stuff when it is sent.  So it reduces bandwidth, but uses the CPU more.  If you're on a local network, don't use it.  If you're going over a slower link, especially if you have a fast processor, then it'd be worth using.

It doesn't matter at all which way you go.  A push and a pull will do exactly the same thing.

As far as selinux, you might have found your own problem.  The answer is no - it seems you need the latest version which supports the -X flag, and you need it on both ends.  Otherwise the copy will just inherit whatever settings the parent has.
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 17

Author Comment

by:mjcoyne
ID: 20385604
Okay, rsync shouldn't be a problem.  The server in work has rsync-2.6.9-2.fc6 on it, according to the RPM database.  I can't check the new server from here (I'm at work, it's at my house waiting for me to haul it in here and pull the trigger on the replacement), but think it has 2.6.9-3.2 on it.

Maybe I'll just dig up my crossover cable and hook the machines together that way, rather than over a LAN...?
0
 
LVL 17

Author Closing Comment

by:mjcoyne
ID: 31411560
Tank you, arrkerr1024.  Things went very smoothly.
0
 
LVL 17

Author Comment

by:mjcoyne
ID: 20425057
That should, of course say "Thank you, arrkerr1024. Things went very smoothly." :)
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question