So on android in 2010 I used to be into the idea of rooting my phone, and installing custom roms.

Distros are essentially custom roms for your pc. Same concept.

There was a program called TWRP that I could use. Back then it would make a full backup of EVERYTHING on your internal drive. It was mostly used after you already had a custom rom.

But it backedup EVERYTHING. If you wrote a txt message as a draft, and didn’t sent it, then backed up with TWRP, whenever you restored on a new phone, that txt draft was there too. It was literally like your phone took an all encompassing picture of everything on your phones internal drive, every single file and setting, and made a backup. Saving it to your sd card.

So I’m thinking, linux should theoretically be able to do this. Maybe it does.

What if my current install is on a 250gb drive, and I buy a completely different 4TB drive? What if I want to do this total backup, save the backup to a usb hard drive, then put in a NEW hard drive, and have it restore the backup so now my entire old hard drive is now on my new hard drive? And every setting, every file, every last detail is an exact replica.

Could I do that?

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    2 days ago

    You can, and there are a number of options.

    Easiest IMO is to install both drives, and then use dd to copy drive A to drive B, and then resize the partitions with gparted to fill the rest of the disk.

    Do this from a live USB so that your not currently using drive A.

    https://serverfault.com/a/4912

    Note that /dev/sda might not be your first disk, so make sure you get them correct. Gparted can help you identify your disks.

    • MangoPenguin@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      2 days ago

      Does linux have an equivalent of VSS on windows? I always thought it was odd that Linux needed to be offline to do a disk image whereas on windows I can just do it without rebooting or anything.

      • CameronDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 days ago

        VSS equivalent would be btrfs snapshots or zfs snapshots.

        Can you really copy a VSS to a new disk? For a new install, at some point you’ll need to reboot and go offline, so I don’t see the point in trying to keep uptime. If uptime matters, dont upgrade a disk, replace the entire system.