Moving/merging a filesystem back into /
rsync at tlinx.org
Wed Dec 4 01:43:06 MST 2013
On 12/2/2013 11:31 AM, Charles Marcus wrote:
> I'm going to be moving a filesystem around, and was planning on using
> rsync to do it, so like to get some advice from those more experienced
> than I (both using rsync, and moving filesystems)...
If you have 'star' on your system, it might be faster.
I'd do it with the system *up*, and, as someone else suggested, copy
/usr to /usr.tmp (assuming you are moving from /usr to the root fs.
For that matter, is there a reason not to give "cp" a try"
mkdir /usr.tmp && cp -ax /usr/. /usr.tmp/.
I guarantee it will be faster than rsync. That or star -- if you want
to know options, I'd have to reread the manpage, way too much to
In a pinch, you could use cpio -- it also handles hard links (both of
the above will automatically handle hard-link tracking without crashing.
rsync should not crash due to hardlink issues. Memory shouldn't
be a problem if you have large enough paging files... (though it might
get very 'dogslow', if you really have problems w/memory.
For the purpose you are stating, copying all of /usr using "cp"
or "star" would be better.
If you have other things mounted on /usr, you can mount a copy of
/usr in /mnt/usr w/o the mounts with:
mount --bind /usr /mnt/usr
That will mount a copy of /usr on /mnt/usr but without the submounts
(as stated in the mount manpage).
More information about the rsync