Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 09-01-2010, 01:39 PM   #1
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
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
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.

Old 09-02-2010, 02:29 AM   #3
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 AM.

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