Migration planning - old system to new

John john at starfire.mn.org
Sun Jan 24 15:18:41 UTC 2010

On Sat, Jan 23, 2010 at 11:35:20PM -0800, Doug Hardie wrote:
> On 23 January 2010, at 22:42, John wrote:
> > On Sun, Jan 24, 2010 at 10:55:14AM +0800, Erich Dollansky wrote:
> >> Hi,
> >> 
> >> On 24 January 2010 am 01:08:27 John wrote:
> >>> doing this on a new machine!  And I don't need any "migration"
> >>> storage, because, well, gosh - it's tcp, people!  ;)  I just
> >>> did the first transfer of home, and it went swell:
> >>> 
> >> how did you handle the strange group IDs?
> > 
> > Have not done that yet.  My current best plan (which I'm not really
> > crazy about, but haven't come up with anything better) is to do
> > 121 "find /home -uid ... -exec chown {} +" and 37
> > "find /home -gid ... -exec chgrp {} +" commands.  This is also called
> > "Let's modify every inode in the filesystem.  Twice."  Oh, well, the
> > ctimes are blown up by the migration anyway (as they really should be).
> > I have to be careful, if there are any IDs that are used on both
> > systems, but with different associations, to do the change in 
> > the right order (sigh).  I could try to get really fancy and just
> > find the distinct combinations of "uid:gid" and do only one
> > "chown uid:gid" for each file, but, getting it done will be more
> > important than being pretty at some point.
> You might check out tar.  At one time it had the option to use user and group names and not ids.  Hence the ids could change between the 2 systems.  It seems like it was on FreeBSD 3 or 4 that I last did that.
> I just tried it with FreeBSD 7.2 creating a tar file.  Digging through the file it shows the ascii names for owner and group - not uid/gid.  I un-tar'd it on a Mac and sure enough it used the names and the uids are quite different for the two systems.

Well, that would just serve me right after dissing tar in favor of
dump/restore earlier in this thread, now wouldn't it?  I think you
can preserve the mtimes, too, if I recall correctly.  The reason
that I don't want to do this, though, is that I don't believe
there's anyway to preserve the "atime" on either system.  The last
access time of every file in the file system would be when I did
the migration (because tar is reading the files through the
filesystem, rather than reading the file system structure on the
disk, like dump does), rather than when they were really last used.

John Lind
john at starfire.MN.ORG

More information about the freebsd-questions mailing list