On 12/23/2013 06:01 AM, akhiezer wrote:
Date: Mon, 23 Dec 2013 00:43:13 +0100
From: Aleksandar Kuktin <[email protected]>
To: [email protected]
Subject: Re: [blfs-support] Complete Backup of {,B}LFS

This looks really interesting and I want to "play" with it. But what
I want *is* a clone, an exact copy, of what I have now.

Dan


On the subject of cloning filesystems (as opposed to cloning devices),
I come up blank with names of programs that can do that, even though
there is probably at least one program that can do that.


'e2image' (part of e2fsprogs pkg) might be partly of some use there, in the
wider-picture: but I'd say for the present task you really want dd or the
find/cpio combination; either of them will do the job just fine. If you
need 100% identical data - incl metadata, timestamps, &c - then I'd say use
dd. Whereas, working at the filesystem-level - as you normally would with
find/cpio, cp, tar, cat, &c - you run the 'risk' of at least some metadata
(e.g. timestamps on dirs) being changed in source &/or target. IME, for
working at the filesystem-level, the find/cpio combination will get you
100% identical data-copy (I've never encountered find/cpio 'choking' on any
filesys-objects), and near-100%-identical metadata-copy (e.g. via those '-a'
& '-m' cpio flags).
I am always quite interested in what one word or phrase means to different people. In this case, my use of "clone" was not as precise as it could have been. I also enjoy learning about the capabilities and uses of the various linux tools. Then, even if I only "darkly" remember, I can look up the tool and learn how to use it.

When I said "clone" I didn't think about the partition size, where the info was located or the metadata. However, my main concern was preservation of ownership, group and permissions. But with the remarks in this thread, I want the times preserved now--I've used them before in "find" for the tests --newer and !--newer.

I completed the backup, but now want to do it again to insure all of this. I used <cp -a> the last time because of permissions. The reason I didn't use the find|cpio combination was that ownersip wasn't preserved. I read the cpio info and saw this--

|--no-preserve-owner|
    Do not change the ownership of the files; leave them owned by the
    user extracting them.


To me that phrase "leave them owned...." says that the files will be owned by me when I'm done and seems to contradict the first part of the sentence which is what I wanted to have happen.

If I use "--no-preserve-owner" will the ownership, group and permissions remain as they are, or do they get changed?

Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to