how to move to a new computer?
from GravitySpoiled@lemmy.ml to linux@lemmy.ml on 17 Jun 2024 14:58
https://lemmy.ml/post/16982437

I just bought a new computer. I’ll install fedora silverblue. Do I just need to copy the home directory? And crontab. What else do I need to move?

#linux

threaded - newest

velox_vulnus@lemmy.ml on 17 Jun 2024 15:24 next collapse

That will preserve your files in home directory - however, it is not reproducible in the sense that you’ll have to install all apps manually.

GravitySpoiled@lemmy.ml on 17 Jun 2024 15:53 collapse

Thx.

Meaning, backup a list of flatpak apps and reinstall them on the new machine

lemmyvore@feddit.nl on 17 Jun 2024 16:04 next collapse

See if flatpak has some sort of export format that would let you install everything the same on the other machine. Some package managers have that.

GravitySpoiled@lemmy.ml on 17 Jun 2024 16:10 collapse

I think I wrote a function for that a year ago, I’ll have a look

boredsquirrel@slrpnk.net on 17 Jun 2024 19:07 collapse

Export the wanted ~/.var/app/ folder to keep flatpak data

rotopenguin@infosec.pub on 18 Jun 2024 01:52 collapse

If you set up flatpak as --user, bringing your home directory over would be 99% of the job.

bloodfart@lemmy.ml on 17 Jun 2024 16:13 next collapse

If you’re currently running a rpm distro, you can make it easier on yourself by using the duke nukem forever command to make a list of your installed programs: dnf list installed.

Once that’s outputting an appropriate format, dump it into a text file with | oldprogs.txt.

On your new computer, that same duke nukem forever command can be used to install from the list with something like dnf install << oldprogs.txt

I bet you can come up with a way to stuff all that into a neat little one liner that’ll provide error handling, output teeing and everything else!

GravitySpoiled@lemmy.ml on 17 Jun 2024 16:36 next collapse

Nice one.

On silverblue, everything is installed within a distrobox. I should back that up and make sure it’s in my home folder.

boredsquirrel@slrpnk.net on 17 Jun 2024 19:00 collapse

No not everything is installed in a Distrobox.

  • the core system contains base stuff
  • you can layer needed apps that need to be on the base system
  • GUI apps are preferred as Flatpaks
  • some random stuff may be in a Toolbox or Distrobox
  • you can use pip, cargo and others on the base OS to install binaries there.
bjoern_tantau@swg-empire.de on 17 Jun 2024 16:37 next collapse

One correction, it would be dnf list installed > oldprogs.txt. > instead of |.

bloodfart@lemmy.ml on 17 Jun 2024 16:44 collapse

Ty, it’s early yet…

boredsquirrel@slrpnk.net on 17 Jun 2024 18:59 next collapse

Well that doesnt work for RPM distros, but just for dnf distros XD

mat@linux.community on 17 Jun 2024 20:09 next collapse

Thanks, I can’t think of it as anything but duke nukem forever now. Your comment made my day.

Tlaloc_Temporal@lemmy.ca on 19 Jun 2024 11:27 collapse

It’s more appealing than the Did Not Finish command. That’s to thematically close to flaming crashes for my liking.

ArcaneSlime@lemmy.dbzer0.com on 19 Jun 2024 00:54 collapse

duke nukem forever

My life has two eras, pre- and post- awakening to this acronym. Updates will never be the same.

GustavoM@lemmy.world on 17 Jun 2024 18:55 next collapse

tl;dr:

dnf list installed > $anydir/meow

On new computer, with fedora installed and the meow file;

dnf install $(cat $anydir/meow)

boredsquirrel@slrpnk.net on 17 Jun 2024 18:58 collapse

Well doesnt work on Silverblue but

flatpak list --app

If you have configured Flatpaks, you may want to copy the ~/.var/app/ directories.

yak@lmy.brx.io on 18 Jun 2024 05:17 next collapse

Consider using tar to create an archive of your home directory, and then unpacking that on the new machine. This will help to capture all the links as well as regular files, and their permissions.

Take a minute to think what else you have changed on the old machine, and then take another minute to think how tricky it would be to replicate on a new machine. Downloading the apps again is gloriously easy. Replacing configs, or keys and certificates, is not!

I normally archive /etc as well, and then I can copy out the specific files I need.

Did you install databases? You’ll want to follow specific instructions for those.

Have you set up web sites? You’ll want to archive /var/www as well.

Dariusmiles2123@sh.itjust.works on 18 Jun 2024 06:48 next collapse

I’m also thinking a lot about the best way to move everything from one computer to another if one day I buy a new computer.

I thought I had found a way with Clonezilla, but after trying to clone my Surface Go 1 to an old laptop I had, it didn’t work. Could be because I hadn’t removed the surface specific kernel. But now I don’t feel safe anymore.

Some people are suggesting to copy my home folder which I did, but I’m not sure it would fit my needs.

Basically, my files are taken care of with cloud storage (kDrive by the way), but I’d like to keep the way all my programs and extensions are setup.

So I ain’t sure I was a big help😅

I hope one day we’ll just have some program to prepare an archive to unpack for your next system to make the transition seamlessly. Or just putting the computer side by side and sending everything wirelessly.

I feel like we need this with all the personalization we can have on Linux.

pinchcramp@lemmy.dbzer0.com on 18 Jun 2024 09:26 collapse

Pretty sure that is possible with Nix and home-manager.

Deckweiss@lemmy.world on 18 Jun 2024 06:56 next collapse

Nobody mentioned it yet, but my current no hassle solution is to:

just physically move the nvme from one computer to the other

eldavi@lemmy.ml on 18 Jun 2024 16:45 next collapse

i’ve done this a couple times w sata and pata drives and it works; there’s lots to clean up to do, but it works.

ikidd@lemmy.world on 19 Jun 2024 03:06 next collapse

That’s all I’ve done, or imaged it to a new drive. Linux is glorious for portability.

John@discuss.tchncs.de on 22 Jun 2024 16:32 collapse

Or if you want to use the new drive, clone your drive to the new one(using clonezilla for example)

halm@leminal.space on 18 Jun 2024 13:30 collapse

I just made the move to another computer, using the same distro and DE setup as the old one. So far I managed by backing up ~/ and /usr/ so I could drop in system and programming settings.

I don’t know how that will work if you’re going for a new distro but it’s always good to have your old configs for reference!