Adam Thornton wrote:
On Feb 12, 2009, at 9:26 AM, Jack Woehr wrote:
Scully, William P wrote:
Does anyone
know of a document which describes a well-accepted technique for
migrating a server's file systems from one format to another?
The classic one is to boot off cd and move stuff.
If you are booted to a ramdisk and have one file system (e.g., the
real
hardddrive root file system) mounted as /old and the new
filesystem mounted as /new then in the Bourne shell or bash you can do
something like:
$ cd /old; tar cf - . | (cd /new; tar xf -)
Rather than cd, I use -C on the tar command.
If you're on a Linux box, though, "cp -a" does a fine job of
preserving file permissions and symlinks and so forth and you don't
need the tar.
tar xpC /mnt/new
does a fine job of preserving stuff.
More generally, and not specifically Zed,
1. tar _might_ be faster
2. The tar solution can be enhanced to copy over a network
tar . | ssh there tar xp
3. Sometimes, the buffer command might improve things. This might be so
if each tar spends time waiting on the other.
4. Sometimes over a network, one might prefer to compress the data.
If I were copying from one partition on a disk to another, I'd probably
use tar and (if I had it) buffer.
However, it'd not discard the possibility of using rsync.
On Zed's disks, the choice probably comes down to typing. I would,
though, read the man page. There might be a finer point your advisors
have overlooked.
In general, you can just mount the new filesystem, and then do cp -ax
(stay on the same filesystem) for each one you want to copy.
The tricky part is, things like databases need to be quiesced first,
so you don't end up with inconsistent files, and you don't get a point
in time copy. Hence the recommendation for booting from CD/to single-
user mode and doing it that way.
To put it straight, you don't want anything changing your files while
you're copying them. a "point in time" copy is the best you'd manage, I
don't think it would be that good, in the case of a database. Especially
if the database comprises more than one file.
The only remaining concern I can think of is extended attributes and
ACLs. If any of your files have extended attributes or ACLs, you
probably want to preserve them. Read the documents for your candidate
weapons and see what it says.
Until recently, tar and other traditional Unix commands on OS X did not
do extended attributes.
See also
getfattr(1)
getfacl(1)
--
Cheers
John
-- spambait
[email protected] [email protected]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
You cannot reply off-list:-)
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390