From 8d74ac52ea1c551a281b0d82958720d8f473cdeb Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 22 Mar 2023 09:08:36 +0200 Subject: [PATCH] gayming/playstaton2/backup-ops2l-vmc.bash: add duperemove --- gayming/playstation2/backup-ops2l-vmc.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gayming/playstation2/backup-ops2l-vmc.bash b/gayming/playstation2/backup-ops2l-vmc.bash index d782824..7f3e5d4 100755 --- a/gayming/playstation2/backup-ops2l-vmc.bash +++ b/gayming/playstation2/backup-ops2l-vmc.bash @@ -16,6 +16,12 @@ cp -arv "$VMCDIR" "$BACKUPDIR/$(date +%Y-%jT%H%M)" chmod -R 777 $VMCDIR chmod -R 777 $BACKUPDIR +# If duperemove is installed, perform FS based deduplication of backups +if hash duperemove 2>/dev/null; then + # recursive, dedupe, human-readable, hashfile is like ddrescue mapfile + duperemove -rdh --hashfile=$BACKUPDIR/duperemove.hashfile $BACKUPDIR/ +fi + # Curiosity, show the space used du -hca --time $BACKUPDIR