moving /home content over to a different disk - how to?
Support, trying to move the content of (almost whole) /home over to a different physical disk. I only have remote access and can only ssh into the machine. Doesnt this get me into trouble of some? locked? files of this user i am sshing with into the users account on this machine? can I su - and then still unmount whole /home and move it over to a different partition on a different disk? what tools do do this best? like rsync? some kind of mirror parameters? any hints appreciated. thanks for having me.
On 2023-08-22 10:22, cagsm wrote:
Support, trying to move the content of (almost whole) /home over to a different physical disk. I only have remote access and can only ssh into the machine.
Doesnt this get me into trouble of some? locked? files of this user i am sshing with into the users account on this machine?
can I su - and then still unmount whole /home and move it over to a different partition on a different disk?
what tools do do this best? like rsync? some kind of mirror parameters?
any hints appreciated. thanks for having me.
You have to login, actually login, as root, not su, because a) at some point you have to umount /home, and b) because to make a perfect copy nothing should be in use at the moment, meaning no user that has /home should be active. If you can not login as root, create a new user that has a different {HOME} The copy can be done perfectly with rsync. Something like this: OPTIONS="--archive --acls --xattrs --hard-links --sparse \ --stats --human-readable " rsync $OPTIONS \ --exclude=/lost+found --exclude=/dev --exclude=/sys \ --exclude=/proc --exclude=/run \ --exclude=/data/** --exclude=/mnt --exclude=/other \ --exclude=/media --exclude=/var/lib/samba/lock/ \ --exclude=/var/run/ \ / destination -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))
when i SSH into the machine with a normal user account and then simply cd / and then su - ending up in the root user then lsof | grep home there are no entries listed. so I guess i can simply unmount the /home partition and create a new one and mount the new as /home and the old as /home2 and then rsync from /home2 stuff to /home i guess.
use tool said ! Disclaimer: Warning, the method usermod said is the only correct way have been experiencing such manual creation without finishing up by Linux usermod just ended up in the extremely painful, obscure, subtlest failure for ~5 days without any clue, nor worse, no one has clue, nor can help in any online media true, OS seemingly is fine.. but wait some dooms nightmare in extensive use, as it bite back definitely it store few flag, bits, or data secretlt to the set /home The online help asking: https://forum.xfce.org/viewtopic.php?pid=72504#p72504 On 8/23/23, cagsm <cumandgets0mem00f@gmail.com> wrote:
when i SSH into the machine with a normal user account and then simply cd /
and then su -
ending up in the root user
then lsof | grep home
there are no entries listed. so I guess i can simply unmount the /home partition and create a new one and mount the new as /home and the old as /home2
and then rsync from /home2 stuff to /home
i guess.
On 2023-08-23 03:53, cagsm wrote:
when i SSH into the machine with a normal user account and then simply cd /
and then su -
ending up in the root user
then lsof | grep home
there are no entries listed. so I guess i can simply unmount the /home partition and create a new one and mount the new as /home and the old as /home2
Try. My guess is the system will refuse to umount.
and then rsync from /home2 stuff to /home
i guess.
-- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))
Op woensdag 23 augustus 2023 09:53:40 CEST schreef cagsm:
when i SSH into the machine with a normal user account and then simply cd /
and then su -
ending up in the root user
then lsof | grep home
there are no entries listed. so I guess i can simply unmount the /home partition and create a new one and mount the new as /home and the old as /home2
and then rsync from /home2 stuff to /home
i guess.
Why doesn't you ssh to root, maybe you do it using an ssh key if you disabled root access using a password. -- fr.gr. member openSUSE Freek de Kruijf
participants (4)
-
Budi
-
cagsm
-
Carlos E. R.
-
Freek de Kruijf