rclone/backend/union
nielash 87ec26001f local: add server-side copy with xattrs on macOS (part-fix #1710)
Before this change, macOS-specific metadata was not preserved by rclone, even for
local-to-local transfers (it does not use the "user." prefix, nor is Mac metadata
limited to xattrs.) Additionally, rclone did not take advantage of APFS's native
"cloning" functionality for fast and deduplicated transfers.

After this change, local (on macOS only) supports "server-side copy" similarly to
other remotes, and achieves this by using (when possible) macOS's native APFS
"cloning", which is the same underlying mechanism deployed when a user
duplicates a file via the Finder UI. This has several advantages over the
previous behavior:

- It is extremely fast (even large files can be cloned instantly)
- It is very efficient in terms of storage, as it automatically deduplicates when
possible (i.e. so that having two identical files does not consume more storage
than having just one.) (The concept is similar to a "hard link", but subsequent
modifications will not affect the original file.)
- It preserves Mac-specific metadata to the maximum degree, including not only
xattrs but also metadata not easily settable by other methods, including Finder
and Spotlight params.

When server-side "clone" is not available (for example, on non-APFS volumes), it
falls back to server-side "copy" (still preserving metadata but using more disk
storage.) It is only used when both remotes are local (and not wrapped by other
remotes, such as crypt.) The behavior of local on non-mac systems is unchanged.
2024-08-15 15:36:38 +01:00
..
common union: add min_free_space option for lfs/eplfs policies - fixes #6071 2022-06-16 22:13:50 +01:00
policy union: the root folder shows the modtime configured by --default-time #6986 2023-05-04 15:03:11 +01:00
upstream fs: define the optional interface SetMetadata and implement it in wrapping backends 2024-05-14 12:51:03 +01:00
entry.go cache,chunker,combine,compress,crypt,hasher,union: implement MkdirMetadata and related Features 2024-02-28 16:09:04 +00:00
errors.go union: allow errors to be unwrapped for inspection 2023-06-10 14:39:41 +01:00
errors_test.go build: update to go1.23rc1 and make go1.21 the minimum required version 2024-07-20 10:54:47 +01:00
union.go union: fix deleting dirs when all remotes can't have empty dirs 2024-05-10 11:15:12 +01:00
union_internal_test.go local: add server-side copy with xattrs on macOS (part-fix #1710) 2024-08-15 15:36:38 +01:00
union_test.go features: add new interfaces OpenChunkWriter and ChunkWriter #7056 2023-08-12 17:55:01 +01:00