LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-01-2010, 01:39 PM   #1
mike_phi
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
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.
 
Old 09-01-2010, 06:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 09-02-2010, 02:29 AM   #3
mike_phi
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
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

Last edited by mike_phi; 09-02-2010 at 02:31 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fresh netinstall, no dpkg status file or backup vendtagain Debian 3 11-24-2009 12:06 PM
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 08:52 AM
Need a fresh pair of eyes to review my backup+restore scripts BassKozz Linux - Newbie 6 06-01-2009 04:51 AM
how to create backup MYSQL Script to backup my database for every 1hour RMLinux Linux - Newbie 3 11-20-2008 10:13 AM
Setting password for users in a shell script?? krishvij Linux - Newbie 3 03-10-2005 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration