5

Sorry if this is a stupid question but im pretty new to Ubuntu.I have gotten a new laptop (migrating from an old macbook dualbooting macos and ubuntu) and I am dualbooting windows and kubuntu (switched to kubuntu for reasons I'd rather not include) Anyways, I want to migrate my data over but I can't use a usb-c cable so I'd prefer it to be over LAN.

I'd wish to migrate the following data:

  • Packages and their data (e.g settings, browser history, cookies)
  • Downloads and stuff in the home folder
  • Everything Docker ADDED: - Everything Flatpak (Yes I have to use Flatpak and I hate it)
  • One specific folder in the / directory ADDED: - Libvirt VMs (I use virt-manager)

There's also somethings that i don't need to move over (i.e non-steam game save data cause I don't have steam)

Any advice for data migration and is there also a way to fix any potential permission issues after migration?

p.s Sorry If I Keep Adding Stuff I have a lot going on and I keep forgetting things.

Farhad
  • 61
  • 5
  • "One specific folder in the root" means what exactly?? Do you mean root user, ie. /root/directory or a directory in the / directory, ie. /directory as they do differ. Root is a user & thus has a user directory /root/ (its not a normal user directory thus not in /home/) – guiverc Aug 17 '25 at 23:07
  • You do realize the only difference between Ubuntu and flavors (ie. Kubuntu) is the packages installed by default; ie. https://ubuntu.com/desktop/flavors says "Ubuntu flavors offer a unique way to experience Ubuntu, each with their own choice of default applications and settings." as each flavor team has its own seeds that controls the build of the ISO, all ISOs being built by same infrastructure/builder and all found same place You can just copy files across so I'd not expect problems if same release – guiverc Aug 17 '25 at 23:17
  • When my old box died (Ubuntu 17.10 install; upgraded every 6 months until late 2022 when PSU/power supply died), I just used this new replacement box for some Quality Assurance testing to prove to myself that it was working well & build my trust it in, then just restored the data to the last QA test install I'd made.. It was a different flavor install; but that didn't worry me at all, as that was just packages installed which I changed. I've since non-destructively re-installed anyway – guiverc Aug 17 '25 at 23:21
  • FYI: You do highlight docker; and I have no experience with that sorry; so I'd just refer to the provided answer for clues there. I'm not worried about package differences (where Archisman is) but I always started with Ubuntu Desktop as it was quota free decade+ ago when I had monthly bandwidth restrictions, and just changed packages till I got what I wanted, so am used to it (release can matter here! but you didn't provide release specifics) and I happily move browser configs from my primary box to other boxes (inc. non-Ubuntu non-snap installs!) by just copying files anyway. – guiverc Aug 17 '25 at 23:26
  • I meant a folder in the / directory. it contains a few binary files and is added to my path variable. – Farhad Aug 18 '25 at 06:59

1 Answers1

4
  • Browser history and bookmarks -- Use Firefox sync/Chrome sync

  • Packages - Ubuntu and Kubuntu have different set of default packages, and it is a good idea to not mix them to keep the system clutter free. Copying the whole list of packages from the ubuntu to Kubuntu system will turn the Kubuntu into Ubuntu + KDE. That is not what you would want (for example, you probably don't want GNOME's Nautilus file manager and its dependencies in your Kubuntu install as you already have Dolphin).

You may want to write down the list of apps you need, and install them in one go with a command like

sudo apt install app1 app2 app3

You may want to save the list for the future and keep refining it. For example, here is mine https://github.com/archisman-panigrahi/postinstall-scripts/blob/main/mint-first-install.sh#L43

  • Settings of packages - Copy the .config folder within your home folder from one computer to the other.

  • Browser cookies -- I am not sure if this can be done. Try copying the .config folder, as described above.

  • Downloads and stuff in the home folder - Just copy them with a pendrive.

  • One specific folder in the root - Copy it with a pendrive, and restore it in the new computer using terminal, with sudo

sudo cp /path/to/source/folder/ /path/to/destination
  • Thanks for the answer but is there a way to copy files over LAN if I don't have any usable flashdrives? – Farhad Aug 18 '25 at 06:51
  • 1
    @Farhad Can either machine get a remote shell session (ssh) to the other via the LAN? Old-school method is just to run a tar archive on the donor machine, and pipe it to a tar extract on the receiver. But surely you have an external backup regime running periodically? You can just restore the required files from your latest backup. – Paul_Pedant Aug 18 '25 at 09:10
  • @Farhad See https://ubuntuhandbook.org/index.php/2022/05/share-folder-transfer-files-ubuntu/ – Archisman Panigrahi Aug 18 '25 at 12:15
  • @Paul_Pedant Yes, I can SSH from one machine into another but I've heard about using netcat to pipe tarballs. Can someone please give me details on that? – Farhad Aug 19 '25 at 11:59
  • @Farhad Please ask a new question regarding it – Archisman Panigrahi Aug 19 '25 at 18:46
  • 1
    ssh pipes tarballs (which you can create and install on the fly) with basic commands. netcat seems to write the tarballs to and from disk at both ends (waste of time and space), and has 34 command line options, so maybe leave that to the trained SysAdmins. I recommend KISS above what you heard. – Paul_Pedant Aug 19 '25 at 21:50
  • 1
    @Farhad If connected to the same network via LAN, you can use Linux Mint's Warpinator software to transfer files witha GUI https://github.com/linuxmint/warpinator – Archisman Panigrahi Aug 19 '25 at 23:29
  • But does anyone know how to migrate flatpaks and their data?(Yes I hate flatpak but a few apps i use are only on there) – Farhad Aug 20 '25 at 11:05
  • @Farhad please update the question instead of adding comments, because these comments will have low visibility. – Archisman Panigrahi Aug 20 '25 at 13:55
  • 1
    @Farhad I updated my answer – Archisman Panigrahi Aug 20 '25 at 13:58
  • What about the other hidden folders in my home? (e.g .docker .cert .var .ssh etc.) Do I copy those too? what folders do I avoid copying (that are in my home folder)? – Farhad Aug 21 '25 at 16:11
  • 1
    You should copy only what you need. If you need to copy your docker configuration, then copy it. If you need to copy your ssh configuration, copy that. You can copy stuff in .config so that the apps get the settings you had changed. But again, you should only copy what you need. – Archisman Panigrahi Aug 21 '25 at 19:47