Interview Prep/Linux/Migrations, performance and fleet operations

The new server has different UIDs for the same users than the old one. What breaks during migration and how do you handle it?

IntermediateScenarioMigrations, performance and fleet operations
Answer

Situation read → Files are owned by number; mismatched UIDs give files to the wrong user.

What I'd do →

  1. Compare: getent passwd app on both hosts.
  2. Option A: create users on the new host with the same UIDs/GIDs before copying (useradd -u 1050 -g 1050 app), then rsync with --numeric-ids.
  3. Option B: copy and remap: rsync --usermap=1050:2001 --groupmap=1050:2001 or fix afterwards with find / -xdev -uid 1050 -exec chown -h 2001 {} +.

Why → Consistent UIDs across a fleet (from central identity) avoid this entirely.

Interview tip → This is the same root cause as NFS ownership showing as nobody or wrong names.

All Linux questions Roadmap: Linux

More on Migrations, performance and fleet operations