you cannot copy an os while running because of the mounted stuff inside /dev /proc /sys ,
but the ext4 allows us to mount a partition to different mount points,
and also you can bind already mounted folder .
# create mbr table on new SSD
printf '%s\n' o w |sudo fdisk /dev/sdb;
# create partition on it
printf '%s\n' n p 1 '' '' y w |sudo fdisk /dev/sdb;
# write ext4 fs on new partition
sudo mkfs.ext4 /dev/sdb1;
# create folder where to bind / (root)
sudo mkdir my_os;
# mount new partition
sudo mount /dev/sdb1 /mnt/;
# mount|bind actual system to /mnt
sudo mount --bind / my_os/; # like it will clone / to my_os but excluding sub mountpoints /dev /proc /sys
# copy the system
sudo cp -arxpf my_os/* /mnt/;
# unmount my_os
sudo umount my_os;
# remove created folder my_os
sudo rm -r my_os;
# change partition UUID inside new system
oldUUID="6e92d1d9-ca30-42d9-9e14-c749d0f349b5";
newUUID="$(eval $(sudo blkid /dev/sdb1|awk '{print $2}') ; echo $UUID)";
# loop over files that contains old UUID replace oldUUID by newUUID
sudo grep -rl "${oldUUID}" /mnt/{etc,boot} | while read f;do
sudo sed -i --follow-symlinks "s/${oldUUID}/${newUUID}/g" "${f}"
done
now if you wish to use this as dual boot then you just need to update the grub
sudo update-grub;
if you wish to use on other pc then you need to install grub
for that hard drive to be able to boot
to do so you have two ways :
by installing curent grub to the new hard drive , (a bit risky)
sudo grub-install /dev/sdb;
sudo update-grub;
# unplug new SSD
sudo grub-install /dev/sda;
sudo update-grub;
by chroot into the SSD and install its grub , update it from there !
# mount SSD in not mounted to /mnt
sudo mount /dev/sdb1 /mnt/;
# prepare chroot envirement
sudo mount -t proc /proc /mnt/proc;
sudo mount -t sysfs /sys /mnt/sys;
sudo mount --rbind /dev /mnt/dev;
sudo cp -f /etc/hosts /mnt/etc/;
sudo cp -f /etc/resolv.conf /mnt/etc/resolv.conf;
sudo chroot /mnt rm /etc/mtab 2> /dev/null ;
sudo chroot /mnt ln -s /proc/mounts /etc/mtab ;
# get SSD path by UUID , probably it's /dev/sdb
grub_install_target="$(sudo chroot /mnt blkid |grep "${newUUID}"|awk -F: '{print $1}')";
grub_install_target="${grub_install_target:0:8}";
((${#grub_install_target})) || echo you cannot continue;
# install grub and update it
sudo chroot /mnt grub-install "${grub_install_target}";
sudo chroot /mnt update-grub;
# unmount SSD before unluging it
sudo umount -fl /mnt;
when you boot new copy google about adding a swap file (optional)
but as it was told to you a fresh installation is super quick and fine ,
if you just cannot use usb think about grub-imageboot or grml-rescueboot,
you can boot an iso from your actual hard drive an install it to the new SSD .
good luck