I have a simple wish, with a probably not so simple solution.

I recently started with linux (Arch kde), I’m loving it, I quickly realized that this OS and almost all apps, are highly customizable, I’m laving that as well. My problem is the unavoidable reinstalls and that I have a laptop.

Is there any way that I can save all my configs, apps and my apps’ configs, and transfer them over to my laptop, while almost having a very quick back-up. I realize that I could turn it into an ISO somehow, but that wouldn’t work (I think) because my laptop has vastly different hardware. I also realize the partitioning problem. So in my idealistic world, there should be a solution that requires a clean install (from scripts or manual) and some .sh file, that installs all my apps, pastes all my configs and reboots.

So is this possible? and if yes, how should I go about this? did someone make a tool for this already? Or(!) can I burn it to a flash and the drivers will correct themselves/I’ll deal with them later?

For final words I’d like to say that I’m far from finished configurating, but I’d like to know the proccess, to not shoot myself in the foot somewhere along the way of configing, thanks!

  • UnRelatedBurnerOP
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Analyzing your comment in a different light. What your saying is if I copy my /home (someone said /etc too) over to my laptop, and back it up as well, I’m golden?

    would different hostnames and usernames make a problem? As far as my knowledge goes it won’t as long as I also bring /etc over, but I have no Idea if /etc is connected to something deeper or not.

    And also also, might seem like a dumb question but I had to edit a file to automount my other disks at startup, won’t it like break everything if my system only gets /home after boot or something? Caz I have enought free space to copy over my existing /home, delete it, partition, and mount it back. What’d the benefits and dangers be?

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      13
      ·
      1 year ago

      if I copy my /home (someone said /etc too) over to my laptop, and back it up as well, I’m golden?

      /home yes., but ideally only files and dirs starting with a dot (so called “dotfiles” under your home dir. tar cvfa homedots.tar.gz /home/username/.??* should take care of it.

      Please note it will include some large stuff that’s probably not needed, like .cache, or some individual caches for other apps that don’t use .cache, like the browsers.

      Don’t copy /etc, it’s usually machine-specific.

      would different hostnames and usernames make a problem?

      Hostname no (if you don’t bring etc). Username technically yes, you may want to rename the home dir. The user id and group id are important too but usually off it’s the first user on the same distro it will receive the same ids (typically 1000 nowadays). If not, you can change that manually and recursively chown 1000:1000 -r /home/username.

      • UnRelatedBurnerOP
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        I’d love to upvote you multiple times, you cleared it up for me. Thank you.

        • lemmyvore@feddit.nl
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          You’re welcome.

          To clarify, /etc can have things that are relevant for the machine so you may want to back it up, but it’s not usually transferrable directly to another machine because it probably doesn’t play the exact same role. It has things like service configs, network configs etc.

          Even if you’re trying to migrate a machine to new hardware and the machine will play the same role it’s best to pick and choose files from /etc/ on a case by case basis. What I do is grab a tarball of /etc and set it aside, then if I need to redo something the same way it was on the old machine I can dig through the tarball and only use the relevant files.

          Like I said it’s extremely specific. For example if I want to reconfigure the SSH daemon that’s usually a couple of lines which I know by heart (turn root login and password logins off) which I can do by hand; if I want to reconfigure CUPS printing it’s best to use the CUPS admin interface to autodetect the printer, you don’t usually want to mess with its config files; for some things like /etc/fstab or NFS or RAID I may want to copy some stuff but edit the disk UUIDs; for some things like Samba I could in theory copy the config straight over. It varies.

          The list of installed packages may also be relevant when you migrate to a new machine. Different distros have different commands for obtaining a list of installed packages, and different ways of using that on the new machine to restore the same package selection. This is useful and typically can get you started much faster on the new machine.