[Samba] Moving fileserver

Hamish lists at subvs.co.uk
Wed Jan 19 11:31:09 GMT 2005

Turbo Fredriksson wrote:
> I'm having a problem here I'm not sure how to solve, so I
> hope someone else have done the same (and succeeded :)
> I have an old smb server ('tux') which is ancient (both
> in software and hardware) and can't handle the load.
> This machine is running version 2.2.3a-14.1 (Debian
> GNU/Linux woody) with 'character set = ISO8859-1'.
> The new smb server ('bella') runs samba version
> 3.0.10-1 (Debian GNU/Linux sarge) and is fully
> UTF-8 enabled...
> Now, all files from tux must somehow - this is the
> main problem - be moved to bella. I can't mount
> the disk from tux in bella for two reasons:
>   - bella is using a very limited IDE interface
>     which can't find the disk (Dell PowerEdge 1800).
>   - Because of the differences in NLS (?), any copy
>     from one disk to another will make the file names
>     not to show up correctly on the windows clients.
> Same problem (last one) with NFS. The only way I could
> find is to SMB mount tux on bella and just copy the 
> files (with 'find | cpio'). This works fine, exept the
> file owner and group doesn't match (root is mounting,
> root is owning all files).
> I went through with this, hoping I could write a script
> that sets owner/group of the files on bella. But this
> seemed more difficult than anticipated. Because of the
> differences in NLS, the filenames won't match!
> Creating a list of filenames on both machines, and diffing
> those two files will give me:
> -./shares/delade/Bilder/Jobb bilder/Färöarna/Mvc00019.jpg
> +./shares/delade/Bilder/Jobb bilder/FAArAA¶arnMvc0001919.jpg
> I hope this goes through correctly, but the line which
> starts with '-' is located on 'tux' and the line which
> starts with '+' is located on 'bella'. The problem
> is that the file names don't match betwen the two, so
> I can't take a list from tux, and just use that name
> for 'chown' on bella...
> There are QUITE (haven't counted, but the diff is huge) a
> lot of these changes, so catching all characters and do
> a translation will take ages.
> And, another thing that looks weird is that some file
> names don't seem to differ at all(!): 
> +./shares/delade/PPV rapporter/020703 Örgryte - Örebro.xls
> -./shares/delade/PPV rapporter/020703 Örgryte - Örebro.xls
> Anyone that have done something like this before and
> have a pointer/script to share?

One solution may be to rsync -az all the files, then copy the old tdbs 
across? not sure if they will just "upgrade themselves" - it might be an 
idea to upgrade tux to 3.0.10 to get the tdbs the same, then dump them 
across, the tdbs from tux should contain the username maps, and bella 
will then recognise the correct users...
Not tried it like that, but i have moved files from one server to 
another with rsync and dumped tdbs and it worked (the samba versions 
were the same though, and it was in an AD environment with winbind, so I 
guess the mappings were SID > samba user.
Not sure if that helps, but its an idea!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba/attachments/20050119/9b123915/signature.bin

More information about the samba mailing list