June 9, 20251 yr Prior to the new mover 'empty disk' feature, I was trying to empty my disks in a more manual way using rsync/etc. But out of an abundance of caution, I first wanted to make sure I had copied everything over, verified that it existed properly, and only then remove the duplicate (original) from the source disk I was clearing. I seemingly got part way through this process before getting distracted/finding it too time consuming/etc.Fast forward to the new mover 'empty disk' feature coming out, I figured this would be an awesome time saving tool to let me finish the job I had started and got distracted from; but in running through it, it seems that it will just log a 'file already exists' type message, and then leave the duplicate file in place on the source disk. While I get that this is probably a good default out of an abundance of caution, when I am trying to clear a disk, it's not the most helpful...snip.. Jun 4 16:26:37 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/1a6fd File exists Jun 4 16:26:37 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/1a6fe File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/1a6ff File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/746e4 File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/746f4 File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/bands/3a37e File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/token File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/com.apple.TimeMachine.Results.plist File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/com.apple.TimeMachine.SnapshotHistory.plist File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/com.apple.TimeMachine.MachineID.bckup File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/com.apple.TimeMachine.MachineID.plist File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/Info.bckup File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/REDACTED.sparsebundle/Info.plist File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/.AppleDB/lock File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/.AppleDB/cnid2.db File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/.AppleDB/log.0000000254 File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/.AppleDB/db_errlog File exists Jun 4 16:26:38 REDACTED root: move: /mnt/disk4/TimeMachine/.DS_Store File exists Jun 4 16:26:40 REDACTED root: move: /mnt/disk4/REDACTED/incomplete/REDACTED.meta Success Jun 4 16:26:40 REDACTED root: move: /mnt/disk4/REDACTED/incomplete/REDACTED.meta Success ..snip..Ideally, if I am clearing a disk, and the file I am meant to copy exists as an exact (file hash) match on the destination disk, then instead of logging a message, it should remove the file from my source disk like it would have done if it had had to copy the file across itself.With the mover 'empty disk' tool as it is currently, it seems I need to go back to inventing my own methods of cross-checking the files between my source/destination disks and then removing the duplicates from the source; which basically puts me back at the same level of 'annoyingly manual' that existed before the 'empty disk' feature was announced. Edited June 9, 20251 yr by devalias
June 9, 20251 yr Author Looking at my older notes, it looks like this was the rsync commands I was using/intending to use at the time. I hadn't got around to running the remove command, so I'm not 100% certain it's correct:# Transfer rsync -avh --progress --ignore-existing --log-file=/mnt/cache_1tb/rsync-disk4-to-disk6-1.log /mnt/disk4/ /mnt/disk6/ # Check rsync -avh --progress --dry-run /mnt/disk4/ /mnt/disk6/ # Remove source rsync -avh --remove-source-files --log-file=/mnt/cache_1tb/rsync-disk4-to-disk6-2.log /mnt/disk4/ /mnt/disk6/In re-investigating where I got up to with this, I've been using fclones, which seems to provide a nice way to see and confirm that the files exactly match, and then can process that output to actually remove them; which gives me the certainty that I'm not just blindly removing things:GitHubGitHub - pkolaczk/fclones: Efficient Duplicate File FinderEfficient Duplicate File Finder. Contribute to pkolaczk/fclones development by creating an account on GitHub.First I run fclones group to see the duplicated, and log that to a file:# fclones group /mnt/disk4/Movies\ \(Unsorted\)/ /mnt/disk6/Movies\ \(Unsorted\)/ | tee fclones-duplicates-disk4-moviesunsorted-disk6.txt [2025-06-05 18:28:26.014] fclones: info: Started grouping [2025-06-05 18:28:26.048] fclones: info: Scanned 624 file entries [2025-06-05 18:28:26.048] fclones: info: Found 588 (306.8 GB) files matching selection criteria [2025-06-05 18:28:26.048] fclones: info: Found 374 (159.6 GB) candidates after grouping by size [2025-06-05 18:28:26.048] fclones: info: Found 374 (159.6 GB) candidates after grouping by paths [2025-06-05 18:28:26.048] fclones: warn: File system reiserfs on device /dev/md4p1 doesn't support FIEMAP ioctl API. This is generally harmless, but random access performance might be decreased because fclones can't determine physical on-disk location of file data needed for reading files in the optimal order. [2025-06-05 18:28:35.641] fclones: info: Found 296 (154.1 GB) candidates after grouping by prefix [2025-06-05 18:28:44.120] fclones: info: Found 296 (154.1 GB) candidates after grouping by suffix [2025-06-05 18:48:44.922] fclones: info: Found 296 (154.1 GB) redundant files # Report by fclones 0.34.0 # Timestamp: 2025-06-05 18:48:44.923 +1000 # Command: fclones group '/mnt/disk4/Movies (Unsorted)/' '/mnt/disk6/Movies (Unsorted)/' # Base dir: /mnt/cache_1tb # Total: 306770730946 B (306.8 GB) in 588 files in 292 groups # Redundant: 154119517752 B (154.1 GB) in 296 files # Missing: 0 B (0 B) in 0 files REDACTEDHASH, 2314139648 B (2.3 GB) * 2: /mnt/disk4/Movies (Unsorted)/REDACTED/REDACTED.avi /mnt/disk6/Movies (Unsorted)/REDACTED/REDACTED.avi ..snip..And then I can process that file with fclones remove , using --dry-run to confirm it's going to do what I expect, and --path to ensure it can only remove the duplicate files from my source disk:https://github.com/pkolaczk/fclones#removing-files# cat fclones-duplicates-disk4-moviesunsorted-disk6.txt | fclones remove --path '/mnt/disk4/**' --dry-run | tee fclones-duplicates-disk4-moviesunsorted-disk6-remove-dry-run.txt [2025-06-09 14:26:15.013] fclones: info: Started deduplicating (dry run) rm '/mnt/disk4/Movies (Unsorted)/REDACTED/REDACTED1.avi' rm '/mnt/disk4/Movies (Unsorted)/REDACTED/REDACTED2.avi' [2025-06-09 14:26:15.020] fclones: info: Would process 294 files and reclaim 153.4 GB spaceAnd then if that looks good, I can run it without the dry-run:# cat fclones-duplicates-disk4-moviesunsorted-disk6.txt | fclones remove --path '/mnt/disk4/**' | tee fclones-duplicates-disk4-moviesunsorted-disk6-remove.txt [2025-06-09 14:26:58.272] fclones: info: Started deduplicating [2025-06-09 14:28:18.620] fclones: info: Processed 294 files and reclaimed 153.4 GB space
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.