[Samba] Migrating Samba and Users to another Fedora 3 box
Paul Gienger
pgienger at ae-solutions.com
Fri Mar 18 14:57:35 GMT 2005
>So, could someone please help me out with moving user info and /home
>directory to the new box? Here are some of the things I am assuming I
>will need to keep me from recreating users and what not:
>
>/etc/passwd - for system users
>/etc/samba/smb.conf - my config
>/etc/samba/smbusers - samba user info
>/home - all user dirs and public shares are in here
>
>Is that it?
>
>
Are you running a domain? If so you'll want to grab most/all the .tdb
files from the /var/lib/samba (I think) directory at a minimum.
>Also, this might be the wrong place for this,
>
Just barely ;)
>but...I can't do a
>tar.gz of the home directory due to the fact that the drive is almost
>full. I need to make a tar.gz put | it to the new box via scp. I
>have seen it done before, can anyone point me in the right direction
>for a how-to?
>
>
Well, tar will keep your permissions, so just doing a straight up scp is
out. The easiest way *I* would do it would be using nfs and tar like
so... I believe you would need to have your home directory(s)
provisioned in such a way that you could export the parent over nfs. In
my setup, I have /export/home and then user's home directories are
automounted out of that, so if I were doing it, I would do the following:
1. Mount /export on the new box to like /mnt/tmp or something.
2. Move to the container on the new box that will hold the home dirs
(would probably /export again in my world , but we'll call it /newExport
for clarity)
3. Run this command from /newExport:
tar -cf - -C /mnt/tmp home | tar -xvf -
Now the explanation of that command:
tar - we all know what that does
-cf - create an archive on a named file, in this case the file is -
- - special argument that is stdout (i believe)
-C move to the named directory (/mnt/tmp) before doing anything. This
gets rid of the /mnt/tmp that would be prepended to all the file paths
in the archive if we were doing something like tar -cf somefilie.tar
/mnt/tmp/home
/mnt/tmp - dir to move to
home - directory inside of /mnt/tmp to tar up
| - pipe stdout (remember that - argument?) to the next command, tar
tar - no explanation
-xvf - extract, with verbose output the named file (-)
- - file to extract, in this case it's stdin
--
Paul Gienger Office: 701-281-1884
Applied Engineering Inc.
Systems Architect Fax: 701-281-1322
URL: www.ae-solutions.com mailto: pgienger at ae-solutions.com
More information about the samba
mailing list