Alle 08:15, domenica 16 novembre 2003, Jason Stubbs ha scritto:
> Actually, just thinking - it doesn't preserve modification times which may
> be a problem with /var. Why not just use rsync?

Actually, cp -a preserves mtimes (except for symlinks, you know).
From "Hard-Disk Upgrade Mini-HOWTO" and personal experience, with `cp -ax' you 
can safely copy a live root fs (even with /proc mounted -- it will be 
skipped).
`cp -ax /mnt/gentoo/var/. /mnt/gentoo/newvar'
works perfectly for me (whether newvar does or does not exist).

> rsync -a /mnt/gentoo/var/ /mnt/gentoo/newvar
>
> Make sure to include the trailing slash on the source dir. I did a little
> test as well and found that times are preserved on all files except
> symlinks - but that shouldn't matter.

Use `rsync -aH', so that hardlinks are preserved.

Regards,
    Danilo

-- 
Danilo Piazzalunga <[EMAIL PROTECTED]> | Linux User #245762 |
                                           | ICQ #105550412     |
Public key:  search.keyserver.net          +--------------------+
Fingerprint: D018 815E 8C7F 2AE2 5565  0C36 B5F6 DB20 B800 CB9F |


--
[EMAIL PROTECTED] mailing list

Reply via email to