moving fs to new disk using tar
Hi all, I thought I was being very careful, but this didn't work like I'd hoped. Basically I want to move my /usr fs from one disk to another - the first will eventually be repartitioned, to use LVM and ReiserFS. Other filesystems will follow. So I used this command from / (in single user mode - that's what init 1 does, right?): tar -c --atime-preserve -l usr |tar -C /spareide -x -v --atime-preserve --preserve --same-owner I wasn't entirely clear from the man page which options were intended for use with creating and which with extracting the archive, so when in doubt I used it for both. Now, my understanding was that the -C /spareide should have started the extraction from where my nice empty filesystem was mounted on /spareide/usr - but this didn't happen. It appears to have extracted over itself in /usr, giving lots of warnings about files changing while they were being read (not all of them - maybe only the big ones?), and changing dates on some of them (again not all - dunno why) as well. I'm guessing I've made some fairly fundamental mistake somewhere - any suggestions? My other thought was that it would be nice to do all this with both filesystems unmounted - are there tools for that? Many thanks, Richard -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: moving fs to new disk using tar
heya, On Tue, Feb 11, 2003 at 05:11:08PM +1300, Richard Hector wrote: tar -c --atime-preserve -l usr |tar -C /spareide -x -v --atime-preserve --preserve --same-owner may i suggest a less confusing alternative: rsync -a usr/ /spareide it does for most intents and purposes the same thing. maybe not as efficient on a single run, but a lot easier to remember and less keystrokes too :) hth sean msg30026/pgp0.pgp Description: PGP signature
Re: moving fs to new disk using tar
On Tue, Feb 11, 2003 at 12:48:34AM -0500, sean finney wrote: heya, On Tue, Feb 11, 2003 at 05:11:08PM +1300, Richard Hector wrote: tar -c --atime-preserve -l usr |tar -C /spareide -x -v --atime-preserve --preserve --same-owner may i suggest a less confusing alternative: rsync -a usr/ /spareide Yes, thanks - with the addition of -x (cf -l for tar) because I didn't want /usr/local (sep filesystem), that's more or less what I did. I also remounted /usr read-only. The only thing I couldn't find was an equivalent to the --atime-preserve switch - perhaps rsync does that by default? Many thanks, Richard -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]