1825882 Members
2853 Online
109689 Solutions
New Discussion

Move all user setting

 
SOLVED
Go to solution
peterchu
Super Advisor

Move all user setting

I have a new server ( host A ) and a existing server ( host B ) , I will move all data from host A to host B , could suggest what is the best method to move all the user data including /etc/passwd . /etc/shadow , /etc/group , ~userid/.bash_profile , /home , how to make the user can use the same password after move the server ? thx
6 REPLIES 6
Huc_1
Honored Contributor
Solution

Re: Move all user setting

If the setup of A is not done (that is there are no users on this yet)

I would use rsync for transfer

Here is a meta script

create a directory on A called /transf

From B:
rsync -avz /etc user@A::/transf
rsync -avz /home/ user@A::/transf

on A:
diff /etc/* /transf/etc/* > diff_in_etc.txt
analyse diff_in_etc.txt

Copy the ones that are diff and that you know will not be a problem for A

Note this is just a meta untested script you should adapt it to your environment ex: use --rsh=ssh if you need security during tansfer etc.

Jean-Pierre Huc
Smile I will feel the difference
Huc_1
Honored Contributor

Re: Move all user setting

It seem's I forgot this in ! (Zero point here pls)

Once you have checked the /trans/etc move this over to existing /etc and move /transf/home/* to /home using (tar, rsync, mv)

just how I would go about it realy !

Jean-Pierre Huc


Smile I will feel the difference
Wim Van den Wyngaert
Honored Contributor

Re: Move all user setting

Don't forget to sync the way Linux behaves in the password context if this was modified after initial installation (e.g. redhat-config-users).

Wim
Wim
Gopi Sekar
Honored Contributor

Re: Move all user setting


if you are okay to shut down server B, then boot server B with rescue CD. get in to the prompt, create a tar file from root (/) of what are all the directories and files needed and transfer them (ofcourse enable the network) to server A.

Go to server A, extract them from root prompt (/) and you should have all data from server B.

ofcourse, if you are 100% sure that data in server B can be taken without bringing down the server, then you dont need to shutdown the server B.

general syntax of tar command: tar -cvf tar-file.tar list of directories and files to be tar-ed

Never Never Never Giveup
peterchu
Super Advisor

Re: Move all user setting

I remember that linux has a command can "save" the setting in /etc/passwd , /etc/grooup & /etc/shadow , but not sure what is the command , could someone can advise ? thx
Vitaly Karasik_1
Honored Contributor

Re: Move all user setting

RH linux has "sysreport" utility