I am running Fedora 22 on a Dell Laptop. I plan on migrating to a desktop soon which will also run Fedora 22. What is the best way to go about backing up and restoring my laptop configuration to the new system? I do not have any 3rd party backup/restore software on this system. Would dd be able to work for me? Would a system level backup work or would I need to limit dd to partitions that are not "hardware or device" specific. I am also open to any other suggestions or ideas.


I second the approach of doing a fresh install and then rsyncing /home. But, for completeness, if you want to move your disk from one computer to another with another hardware — either literally or by using dd to copy the contents, make sure you run

sudo dracut --force --no-hostonly

on the machine before you make the backup or copy.

This will generate a generic initial boot image.

By default, Fedora saves space and time by creating boot images which may be specific to your particular hardware.

If you forget to do this and the machine won't boot (due to missing hardware support in the boot image), use the Rescue Mode menu entry at the initial bootloader screen — this always has a larger, generic boot image, and will get you into the system and from there, you can run the dracut command to generate an initial ramfs for your non-rescue environment. (In that case, though, you'll have to identify the kernel version. Look in /boot, and provide the number, like this: dracut --force --no-hostonly --kver 4.2.3-300.fc23.)

  • Can you elaborate on that instruction? Perhaps provide a step by step? I.e, when do I run that command? At what point in the process and on which machine?
    – user53029
    Oct 20 '15 at 18:57
  • There's just the one step. :) But, yes, run it on the machine that you're backing up before you do it.
    – mattdm
    Oct 20 '15 at 19:07

There are several different options here, each with different effects and tradeoffs.

Firstly, you probably don't want to do anything with dd. dd runs a block-level copy; it mirrors a disk image precisely, without caring about files. This will carry files in their associated filesystem along, but there are problems here: if both devices are in the same machine, you may have confusion due to identical UUIDs; it obviously precludes any filesystem-level changes you may wish to make, such as migrating between filesystems, allocating more inodes, or whatever; and it requires that the destination block device be the same size as the source, which is often not the case. (If the destination is larger than the source, it'll still work, but you won't be able to access the extra space until you run a separate resize operation. If the destination is smaller, it'll fail and you won't be able to access your data, even if there was enough free space in the filesystem.)

The main use case for dd is probably if you're cloning root or boot filesystems from one machine to another, which is a somewhat fraught topic on its own. Here dd is appropriate because you usually want to preserve FS UUIDs and so forth, in order to keep the boot process working. But you probably don't want to do this. (The other use is literally dealing with disk images of USB sticks, CDs and so on, but that's not as relevant here.)

What you more likely want to do is a file-level backup/restore. For this I've found rsync to be excellent, if both machines are up at once; if not, it may be better to use tar. Assuming you've run a fresh Fedora install on the desktop system, you should be able to rsync/tar migrate the /home directory from one machine to the other. This will preserve all user files and most user-level customizations (the exceptions being things like crontabs which are stored outside /home). Then, in order to mimic the old setup properly, what remains is just to install all the same software through the package manager. Due to keeping the home directories, where most software stores its configuration, installing it again should leave you with things working the way they were.

  • Great information on dd. I'll look into rsync. Thanks Tom.
    – user53029
    Oct 20 '15 at 16:02
  • Sounds like he wants to clone his laptop drive to another machine, which sounds like a good use case for dd. Use a live system and a network share or external drive for the backup, run dd if=/dev/sda of=drive.dd.img on the laptop and dd if=drive.dd.img of=/dev/sda on the new computer. Be careful - if you misspell if/of, it will not ask you before overwriting the wrong drive!
    – basic6
    Oct 20 '15 at 16:47
  • @basic6- Yes, that is what I want to do. If I followed your instructions, would I need run the dd restore command on the new systems while booted from a liveCD or is there another way? Are you sure dd would work in this scenario?
    – user53029
    Oct 20 '15 at 17:01
  • The problem with cloning the whole drive is 1. you need to adjust the size afterward, or else you can't use the extra space (even more of a pain with partitions), 2. you can't be sure hardware is compatible (don't know about Fedora, but a lot of distros do some machine-specific stuff at install time). The problems this can cause are subtle enough that I'd generally recommend a fresh install and file-level copy instead.
    – Tom Hunt
    Oct 20 '15 at 17:04

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