I am restoring a backup of my home partition and I needed to boot in to a Live environment running from a USB to rsync it back.
Maybe I’m doing this wrong but I created the backup as a particular user with the -a (archive) option to preserve permissions and ownership etc…
Now to restore that backup with rsync from a Live Manjaro USB environment do I need to create that same user and run the rsync command as that user? Or if I run sudo rsync… will the permissions and everything be restored?
If I need to run the rsync command as the same user I was when I made the rsync backup then can somone help me create a new user in the Manjaro Live Environment?
When I do these commands:
$ sudo useradd -m test
$ sudo passwd
I get prompted to enter the current password for the “test” user but I haven’t given it a password yet? I tried just pressing ENTER and hitting SPACE then ENTER and typing in * then ENTER but nothing. Apparently there is already a password for the “test” user even though I never set one.
Maybe it’s just not possible to create a new user in the Manjaro Live USB environment?
Thank you both,I got the contents of my home partition restored in the end…
Yes I think the confusion with setting a password for a new user in the live environment was that I was doing sudo passwd instead of sudo passwd test. But I don’t think I needed to create that ‘test’ user in the live environment in order to run the rsync command after all.
In the end I still needed to run rsync as sudo anyway due to permission issues I guess because the UID of the user running the rsync command to restore the backup was not the same as the UID of the files/folders in the backup. Maybe I could have avoided using sudo by simply switching to or creating a user with the same UID as the files in the backup… at this stage I’m just glad it seemed to work out!
In the end I think it doesn’t matter what user runs the rsync command because I was using rsync -a to preserve ownership and permissions when making and restoring the backup.