LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2006, 03:30 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
transfering a whole dataserver


Hi!

I bought a new server and would like to transfer all data (around 30GB) from the old to the new server. I guess that is a pretty classical job and I'm not quite sure how to do it. How is it the typical way to handle such a case: transfer files with permissions and ownerships, and transfering the users from the old to the new server.
Should I use scp, mount, ssh & tar?

I started with scp but I lose then the ownerships. But If I want to keep the ownerships, then all the users have to be registered in the new server, but then if i just past users an groups from the old to the new, I'm afraid that some group_Id or anything might not be working beacause there are already users in the new server.

I hope that I'm not being too confusing and would appreciate to learn what is the clean way to handle this case.

Thanks.
 
Old 02-03-2006, 04:08 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
rsync (over ssh) unison (over ssh) or tar archives do the job. unison is actually a file syncronizer, but can be handy for such a single use. you might have to edit /etc/passwd and /etc/group and /etc/shadow manually, so you dont overwrite any system user data. use the programs vipw (for /etc/passwd) and vigp (for /etc/group). a simple copy and past of the user data is ok here. read the man pages for rsync, unison or tar, depending on what you want to use, so you can see which parameters you need for keeping ownership and permissions (you might want to use numerical ownership if you transfere the data before creating the users)
 
Old 02-03-2006, 05:18 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Thanks!
Quote:
Originally Posted by Nathanael
use the programs vipw (for /etc/passwd) and vigp (for /etc/group). a simple copy and past of the user data is ok here. read the man pages for rsync, unison or tar, depending on what you want to use, so you can see which parameters you need for keeping ownership and permissions
Will then shadow be automatically updated?
Quote:
Originally Posted by Nathanael
(you might want to use numerical ownership if you transfere the data before creating the users)
How may do this?
 
Old 02-05-2006, 04:06 PM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
1. no, shadow is not automatically updated, you have to do this using vim again. i have not seen a tool like vipw or vigp to edit the shadow file. but a simple copy and paste should do the trick. please dont forget to only transfere the entries corresponding to actual users and not system users (you can destinguish between users and sys-users by the login program specified, eg. /bin/bash or /bin/false, sys-users will have something that is not a shell:/bin/false)

2. have a look at the man page for whatever program you choose to use. tar for example will use the parameters --preserve and --numeric-owner. you should generally read the man page if you are not familiar with a programm.
 
Old 02-07-2006, 09:23 AM   #5
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
In the first server I have in group:
sysadmin::14:bob,Dave
and in the 2nd I only have
" sysadmin:: "
without any user. May I just add manually bob and Dave in the file "group" of the second server?
 
Old 02-08-2006, 09:25 AM   #6
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
yes you may
 
  


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
File transfering mikejac69 LinuxQuestions.org Member Success Stories 5 08-25-2005 04:05 PM
Transfering file lazwaz Programming 1 05-26-2005 04:34 PM
Transfering Files webwally Linux - Networking 2 04-20-2005 05:17 AM
Transfering my files unixfreak Linux - Newbie 1 08-11-2004 09:53 PM
transfering user settings exigent Linux - General 23 09-25-2002 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

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