gayming/playstaton2/backup-ops2l-vmc.bash: add duperemove

This commit is contained in:
Aminda Suomalainen 2023-03-22 09:08:36 +02:00
parent 8b087eacc6
commit 8d74ac52ea
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

View File

@ -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