On 08/25/2014 02:38 PM, Robert Moskowitz wrote:
> So what is the magic command with all the directories like /dev/ and
> /proc/ that you do not want to try and include their contents, but you
> still need the directory tree?
>
> I want to move a rootfs from one HD to another, and this seems to be
> the most straightforward way.
>
dd if=/dev/<old_root> of=/dev/<new_root>
maybe followed by resize2fs

/dev and /proc are not the issue. They are normally mounted as a
separate fs and most of the tools have an option for restricting to one
file system:
tar: --one-file-system
cp: -x, --one-file-system
rsync: -x, --one-file-system

But there are also hardlinks, sockets, selinux properties, etc to
consider. I think these can all be handled with special options to the
tools, but normally I don't bother and just dd the whole partition.

Jacco



_______________________________________________
users mailing list
[email protected]
http://lists.redsleeve.org/mailman/listinfo/users

Reply via email to