Wrong file ownerships after moving HDD to another computer
I've installed Ubuntu server on Computer1 a while ago and added an additional Hdd to it.
Now I want to create a backup server of Computer1. I've installed new Ubuntu server on Computer2 with the same packages, and users. The last step is to move the Hdd from Computer1 to Computer2.
And here is the problem:
the users on Computer2 were not created in the same sequence as on Computer1 so when I mount the Hdd to Computer2 the files have wrong ownerships (www-data becomes mysql, etc.).
Is there a script to change ownersip of all files of particular user to another user? Or is there a better way of moving files to another computer?
Tags for this Thread