1 |
Am Sun, Apr 03, 2022 at 09:59:22AM +0100 schrieb Wols Lists: |
2 |
> On 03/04/2022 02:15, Bill Kenworthy wrote: |
3 |
> > Rsync has a bwlimit argument which helps here. Note that rsync copies |
4 |
> > the whole file on what it considers local storage (which can be mounted |
5 |
> > network shares) ... this can cause a real slowdown. |
6 |
> |
7 |
> It won't help on the initial copy, but look at the - I think it is - |
8 |
> --in-place option. |
9 |
|
10 |
This one is mostly useful if space on the destination is tight or the data |
11 |
link (for FS commands) is slooow, because normally rsync creates a new temp |
12 |
file and moves it into place once the transfer is complete. This to ensure |
13 |
you never lose data due to a broken connection. If space is tight you could |
14 |
also consider --delete-before instead, to first do all deletions before |
15 |
copying the new stuff. |
16 |
|
17 |
> It won't help with the "read and compare", but it only writes what has |
18 |
> changed, so if a big file has changed slightly, it'll stop it re-copying the |
19 |
> whole file. |
20 |
|
21 |
I think you mean the -c (or --checksum) option, which causes rsync to read |
22 |
the source and destination file (if both exist) in order to determine |
23 |
whether the source has changed. In normal use cases, this should not be |
24 |
necessary, as the file’s metadata (timestamps, permissions, inode numbers) |
25 |
are enough for that. |
26 |
|
27 |
As long as you don’t use -c, rsync is very quick at finding changed files. |
28 |
|
29 |
My standard command is rsync -ai --delete, wich does what most people™ need |
30 |
(-a/--archive means to copy all time stamps, permissions and owner, and -i |
31 |
shows what rsync does and why it does it). In some special cases, I include |
32 |
-x to not cross file systems (like when archiving /), or -H for hard links. |
33 |
I don’t deliberately use extended attributes, for which -X is your friend. |
34 |
|
35 |
-- |
36 |
Grüße | Greetings | Salut | Qapla’ |
37 |
Please do not share anything from, with or about me on any social network. |
38 |
|
39 |
“Don’t put multiple statements on a single line unless you have something |
40 |
to hide.” – Linus Torvalds, Linux kernel coding style documentation |