Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a headless Fedora 15 (without GUI) box. With the following partition structure:

$ df -T -h
Filesystem    Type    Size  Used Avail Use% Mounted on
rootfs      rootfs     49G  2.8G   46G   6% /
udev      devtmpfs    1.7G  4.0K  1.7G   1% /dev
tmpfs        tmpfs    1.7G     0  1.7G   0% /dev/shm
tmpfs        tmpfs    1.7G  604K  1.7G   1% /run
/dev/sda1     ext4     49G  2.8G   46G   6% /
tmpfs        tmpfs    1.7G     0  1.7G   0% /sys/fs/cgroup
tmpfs        tmpfs    1.7G     0  1.7G   0% /media
/dev/sda5     ext4    388G   35G  334G  10% /var
/dev/sda2     ext4     28G  1.7G   25G   7% /home

I am tired of Fedora Project's policy of 12-14 month support cycle (they may have their reasons) and intend to migrate to something more stable like Scientific Linux or CentOS. Most of my data is in /var (MySQL, Redis & Apache Docroot) and /home.

Is it possible that I can migrate from fedora to other RH family distro by preserving the directories /var and /home and do so remotely? (Under dire circumstances I am willing to carry a monitor and keyboard to it.) If yes, then what are the steps for the same?

share|improve this question
up vote 6 down vote accepted

Theoretically, sure. You could theoretically change a Fedora box to Slackware in place, if you cared enough to take the time it would require to do so without destroying something.

Generally, it's seen as not worth the effort.

You'll notice, after reading the CentOS/SL documentation, that they don't even recommend upgrading between major releases in-place, even interactively at the console. Going from bleeding edge Fedora to, say, CentOS 6, would be even worse, as it's effectively a downgrade, from a features and versions perspective. You may have noticed that it's often a lot more work to downgrade a single RPM than to upgrade one; now realize that you're talking about doing this for around a thousand RPMs for a fairly bare-bones server, more for a system with the Desktop, Workstation, or Everything package sets installed.

Best practice is to back up, reinstall the OS from scratch, and restore.

If you can do it, try it on a VM first. You might then be able to deploy that VM directly to the hosting provider, once you finalize it. If not, then at least take notes along the way, so you can make the switch-over quickly.

Exactly how you go about backing up and restoring is actually a pile of separate questions. For example, the MySQL DB probably should be backed up more intelligently than just stopping the server and copying the raw DB files, since you're likely going to be downgrading the server version along with the OS change. You'd want to do a SQL dump instead. Just one example among several, you'll probably find.

share|improve this answer
I think I have (if not backup) the ability to repopulate /var from the Dev Machine. – WeaklyTyped Jul 7 '12 at 7:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.