GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - markfasheh/duperemove: Tools for deduping file systems

BranchesTags
Open more actions menu

Latest commit

 

History

993 Commits
993 Commits

Folders and files

NameName
Last commit message
Last commit date
completion/zsh
completion/zsh
 
 
docs
docs
 
 
markdown
markdown
 
 
.gitignore
.gitignore
 
 
Changelog.md
Changelog.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
SubmittingPatches
SubmittingPatches
 
 
btrfs-extent-same.8
btrfs-extent-same.8
 
 
btrfs-extent-same.c
btrfs-extent-same.c
 
 
btrfs-util.c
btrfs-util.c
 
 
btrfs-util.h
btrfs-util.h
 
 
csum-test.c
csum-test.c
 
 
csum.c
csum.c
 
 
csum.h
csum.h
 
 
dbfile.c
dbfile.c
 
 
dbfile.h
dbfile.h
 
 
debug.c
debug.c
 
 
debug.h
debug.h
 
 
dedupe.c
dedupe.c
 
 
dedupe.h
dedupe.h
 
 
duperemove.8
duperemove.8
 
 
duperemove.c
duperemove.c
 
 
fiemap.c
fiemap.c
 
 
fiemap.h
fiemap.h
 
 
file_flags.h
file_flags.h
 
 
file_scan.c
file_scan.c
 
 
file_scan.h
file_scan.h
 
 
filerec.c
filerec.c
 
 
filerec.h
filerec.h
 
 
find_dupes.c
find_dupes.c
 
 
find_dupes.h
find_dupes.h
 
 
hash-tree.c
hash-tree.c
 
 
hash-tree.h
hash-tree.h
 
 
hashstats.8
hashstats.8
 
 
hashstats.c
hashstats.c
 
 
ioctl.h
ioctl.h
 
 
kernel.h
kernel.h
 
 
list.h
list.h
 
 
list_sort.c
list_sort.c
 
 
list_sort.h
list_sort.h
 
 
memstats.c
memstats.c
 
 
memstats.h
memstats.h
 
 
minunit.h
minunit.h
 
 
opt.c
opt.c
 
 
opt.h
opt.h
 
 
progress.c
progress.c
 
 
progress.h
progress.h
 
 
rbtree.c
rbtree.c
 
 
rbtree.h
rbtree.h
 
 
rbtree.txt
rbtree.txt
 
 
rbtree_augmented.h
rbtree_augmented.h
 
 
results-tree.c
results-tree.c
 
 
results-tree.h
results-tree.h
 
 
run_dedupe.c
run_dedupe.c
 
 
run_dedupe.h
run_dedupe.h
 
 
show-shared-extents
show-shared-extents
 
 
show-shared-extents.8
show-shared-extents.8
 
 
tests.c
tests.c
 
 
threads.c
threads.c
 
 
threads.h
threads.h
 
 
util.c
util.c
 
 
util.h
util.h
 
 

Repository files navigation

Duperemove

Duperemove is a simple tool for finding duplicated extents and submitting them for deduplication. When given a list of files it will hash their contents on an extent by extent basis and compare those hashes to each other, finding and categorizing extents that match each other. Optionally, a per-block hash can be applied for further duplication lookup. When given the -d option, duperemove will submit those extents for deduplication using the Linux kernel FIDEDUPRANGE ioctl.

Duperemove can store the hashes it computes in a 'hashfile'. If given an existing hashfile, duperemove will only compute hashes for those files which have changed since the last run. Thus you can run duperemove repeatedly on your data as it changes, without having to re-checksum unchanged data.

Duperemove can also take input from the fdupes program.

See the duperemove man page for further details about running duperemove.

Requirements

The latest stable code can be found in the release page

  • Linux kernel 3.13 or later
  • GNU make
  • pkg-config
  • glib2
  • sqlite3
  • libxxhash 0.8.0 or later (libxxhash-dev on Debian)
  • util-linux (for libuuid, libmount, libblkid)
  • libbsd (libbsd-dev on Debian)

Then to build Duperemove run make.

FAQ

Please see the FAQ section in the duperemove man page

For bug reports and feature requests please use the github issue tracker

Examples

Please see the examples section of the duperemove man page for a complete set of usage examples, including hashfile usage.

A simple example, with program output

Duperemove takes a list of files and directories to scan for dedupe. If a directory is specified, all regular files within it will be scanned. Duperemove can also be told to recursively scan directories with the '-r' switch. If '-h' is provided, duperemove will print numbers in powers of 1024 (e.g., "128K").

Assume this abitrary layout for the following examples.

.
├── dir1
│   ├── file3
│   ├── file4
│   └── subdir1
│       └── file5
├── file1
└── file2

This will dedupe files 'file1' and 'file2':

duperemove -dh file1 file2

This does the same but adds any files in dir1 (file3 and file4):

duperemove -dh file1 file2 dir1

This will dedupe exactly the same as above but will recursively walk dir1, thus adding file5.

duperemove -dhr file1 file2 dir1/

An actual run, output will differ according to duperemove version.

Using 128K blocks
Using hash: murmur3
Using 4 threads for file hashing phase
csum: /btrfs/file1 	[1/5] (20.00%)
csum: /btrfs/file2 	[2/5] (40.00%)
csum: /btrfs/dir1/subdir1/file5 	[3/5] (60.00%)
csum: /btrfs/dir1/file3 	[4/5] (80.00%)
csum: /btrfs/dir1/file4 	[5/5] (100.00%)
Total files:  5
Total hashes: 80
Loading only duplicated hashes from hashfile.
Hashing completed. Calculating duplicate extents - this may take some time.
Simple read and compare of file data found 3 instances of extents that might benefit from deduplication.
Showing 2 identical extents of length 512.0K with id 0971ffa6
Start		Filename
512.0K	"/btrfs/file1"
1.5M	"/btrfs/dir1/file4"
Showing 2 identical extents of length 1.0M with id b34ffe8f
Start		Filename
0.0	"/btrfs/dir1/file4"
0.0	"/btrfs/dir1/file3"
Showing 3 identical extents of length 1.5M with id f913dceb
Start		Filename
0.0	"/btrfs/file2"
0.0	"/btrfs/dir1/file3"
0.0	"/btrfs/dir1/subdir1/file5"
Using 4 threads for dedupe phase
[0x147f4a0] Try to dedupe extents with id 0971ffa6
[0x147f770] Try to dedupe extents with id b34ffe8f
[0x147f680] Try to dedupe extents with id f913dceb
[0x147f4a0] Dedupe 1 extents (id: 0971ffa6) with target: (512.0K, 512.0K), "/btrfs/file1"
[0x147f770] Dedupe 1 extents (id: b34ffe8f) with target: (0.0, 1.0M), "/btrfs/dir1/file4"
[0x147f680] Dedupe 2 extents (id: f913dceb) with target: (0.0, 1.5M), "/btrfs/file2"
Kernel processed data (excludes target files): 4.5M
Comparison of extent info shows a net change in shared extents of: 5.5M

Links of interest

  • The duperemove wiki has both design and performance documentation.

  • duperemove-tests has a growing assortment of regression tests.

  • Duperemove web page

About

Tools for deduping file systems

Resources

Readme
GPL-2.0 license
Activity

Stars

1.0k stars

Watchers

31 watching

Forks

108 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.