You are not logged in.

#1 2021-01-10 01:42:05

kendew
Member
Registered: 2016-11-09
Posts: 13

Best way to copy between two identical units

I have two identical NUH8i5BEH units with nearly identical SSDs (Samsung 970 Evo and 970 Evo Plus, 500G).  I've done an Arch install on one including LXQt DE and some tweaking.  It would be convenient and time saving if I could simply copy the one SSD to the other.  I've read the wiki about rsync but I wonder if, since the units are identical, something like dd could be used to more easily copy one unto the other without losing data or quality.  Having the best possible install is more important than convenience or saving time.
Suggestions or ideas appreciated.
Kendew

Offline

#2 2021-01-10 02:09:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,909
Website

Re: Best way to copy between two identical units

dd should work fine.  I'm not sure if it'd actually be necessary, but I'd only dd from a third system (e.g., live media boot) so that the source isn't being written to at the time of the dd.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-01-12 02:33:20

kendew
Member
Registered: 2016-11-09
Posts: 13

Re: Best way to copy between two identical units

Thanks for replying.  It sounds like good advice.  Perhaps I could boot from the original Arch USB stick I used to install Arch, use dd to copy the SSD to an SD card, go to the second NUC unit, boot from the same Arch USB and use dd to copy from the SD card to the new SSD?

Offline

#4 2021-01-12 03:00:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,909
Website

Re: Best way to copy between two identical units

Well, not likely - I doubt you have a 500G sd card, do you?  If you can't connect both drives to the same system, then none of these options are that useful, and you'd be better off doing a fresh install, and just clone your configs and a list of packages that you can then install on the second machine.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2021-01-12 22:52:11

kendew
Member
Registered: 2016-11-09
Posts: 13

Re: Best way to copy between two identical units

I have a 120G SD card, which is enough to cover the 16G or so data installed now on the SSD.  Are you saying I need to copy all the free space?  I was thinking of copying the 16 G and then expanding it out to 500G using fdisk or something.  Is this not a good option?

Offline

#6 2021-01-12 23:12:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 24,909
Website

Re: Best way to copy between two identical units

dd duplicates devices, not data. If your partitions are smaller than 500GB (and smaller that 120G), then you can clone the partition rather than the drive, but then you'd need to partition the new drive before copying to it.

Rsync can copy data rather than devices - so perhaps that'd be a way to go - but that's where I think it'd be easier to just do a fresh install, and bring over a copy of your configs, any home partition data, and a list of explicitly installed packages.  Really a base install should take minutes - a lot less time than you've spent thinking about what you could do to avoid it.

Last edited by Trilby (2021-01-12 23:25:05)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2021-01-12 23:19:47

twobooks
Member
Registered: 2020-06-23
Posts: 26

Re: Best way to copy between two identical units

I use fsarchiver to backup unmounted partition, and restore the backup to another partition that is big enough to do the restore, I have done this for ext4 or xfs; the new partition will have the exact same UUID and label. you need to generate a new UUID for one of the partitions to keep the UUID unique.

Offline

Board footer

Powered by FluxBB