3 ms·
If your tool is copying a huge directory. It's half-way done and then a file changes in the half not yet copied (as well as a file in the half you did copy). No
by cyphar 10y ago
If your tool is copying a huge directory. It's half-way done and then a file changes in the half not yet copied (as well as a file in the half you did copy). Now your directory is in an inconsistent state: the "snapshot" doesn't show a valid state of the directory at any point in time. Unfortunately the only way to practically fix this is to have a filesystem that supports snapshots (luckily you have btrfs, which does). In addition, btrfs send-recieve sends deltas of a transaction history so you have very little storage and network overhead as a result (and snapshots are actually even cheaper than how rsync uses hard links because rather than having a hard link for every file you essentially have a "hard link" to the state of the filesystem at that time (the transaction)).