From: Stelian P. <st...@po...> - 2004-01-03 20:18:23
|
On Sat, Jan 03, 2004 at 01:21:30PM -0600, Brent Busby wrote: > Hello, I am trying to use 'restore' to put the contents of /, /usr, and > /opt onto one / partition. (I also have a /var, /tmp, and /home > partition, but I'm leaving those alone and only consolidating /usr and > /opt.) My question regards the best type of restore operation to do this. > > Obviously I'm going to want to repartition and then mke2fs the new root > partition, and do 'restore -rv' from tape to put the old contents of / > onto the new big root partition. But then... > > What about /usr and /opt? The man page says that '-r' should only be used > on a pristine volume that has just been formatted. That would no longer > be the case for my root partition now that I've just restored the old / > onto it. Just use restore -r, it will work. You'll get warnings if you have some name collisions (same filename on several files) but if will work just fine. So: mkfs /dev/... mount /dev/... /mnt/new cd /mnt/new restore rf /path/to/root.dump mkdir usr cd usr restore rf /path/to/usr.dump cd .. mkdir opt cd opt restore rf /path/to/opt.dump > So I use -x instead? The man page for restore says the -x option will (if > possible) restore "the owner, modification time, and mode." What about > the creation time...last access time...group...hardlinks...special/sparse > files? The author of the man page may have just been omitting such things > for brevity, but it gives the impression that a -x type restore is quite a > bit less complete than a -r. Which I shouldn't use (it says) on a > filesystem that already has data on it. You can also use -x. -x and -r are quite equivalent, the main difference is that -r is optimised for speed when restoring all the data (-x gives the opportunity to restore only a part of the data), and -r understand incremental restores (which doesn't matter for you). > That leaves -i as the only other option, which I suppose I would use by > interactively selecting everything to simulate a -r without whatever nasty > effects I would get from an actual -r. -i will behave exactly like -x. > I'm so confused. <g> > > What's the best thing to do here? How should one best restore an entire > volume dump preserving as much of the original metadata and filesystem > structure as possible into a subdirectory of an existing filesystem with > data on it? -r? -x? -i with everything selected...? See above. Stelian. -- Stelian Pop <st...@po...> |