Gotchas when migrating users to a new Linux server?

Posted on 2007-11-28
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 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.
Question by:mjcoyne
  • 4
  • 2
LVL 14

Expert Comment

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.
LVL 17

Author Comment

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...
LVL 14

Accepted Solution

arrkerr1024 earned 500 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.
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

LVL 17

Author Comment

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...?
LVL 17

Author Closing Comment

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

Author Comment

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

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now