Kopiowanie dużej liczby plików

When I have to copy a large amount of data, I usually use a combination of tar and rsync. The first pass is to tar it, something like this:

<code># (cd /src; tar cf - .) | (cd /dst; tar xpf -)
</code>

Usually with a large amount of files, there will be some that tar can’t handle for whatever reason. Or maybe the process will get interrupted, or if it is a filesystem migration, the you might want to do the initial copy before the actual migration step. At any rate, after the initial copy, I do an rsync step to sync it all up:

<code># cd /dst; rsync -avPHSx --delete /src/ .
</code>

Note that the trailing slash on /src/ is important.

Zaszufladkowano do kategorii linux