Script to backup all users to be used for setting up a fresh installation
Hi there I am using Debian Lenny but I guess my question applies to any distro with applicable changes.
I would like a pointer to a script or utility I could use to enable me to backup all users on my current installed system and then use this data to automatically setup all these users on another system (could be a fresh installed system) basically port all users. additional features that would be nice to have -backup passwords -home directory or more specifically www web directory -database backup. Any type of info would help as I can use this as reference to writting this magic script. |
Hi Mike,
The info you supplied here is a tad meager. While it holds true that all Linux distros are basically the same in the way they hold user information (/etc/passwd & /etc/shadow) not all will necessarily use the same numeric user-IDs for all (system-)users, and will quite likely use different names for different daemons. So a port/move from distro to distro may not be trivially possible, and most likely not w/o some on a per-move basis coding. That said: You can get the user accounts out of /etc/passwd, and if you copy the relevant lines from /etc/shadow across as well preserve passwords. You'll need to make sure that there's no duplicate UIDs on the target system, and that each user gets a UID that matches the ownership of their home. Home you can back up using tar. To get answers regarding web & database you'll need to specify which RDBMS you're using, and whether the users web pages are under ~/public_html or somewhere else in the file-system. Cheers, Tink |
intra Distro User Porting
Apologies, As I guess I was misunderstood. heres the clarification I did not mean I intend porting from distro to distro the reason I mentioned the distro issue was just to highlight that the possible answer could be based on a distro other than Debian and I would take relevant inter distro differences into account.
I am interested in porting to another physical machine with the same distro. Regards Mick |
All times are GMT -5. The time now is 07:02 AM. |