sukria / Backup-Manager

Versatile yet easy to use command line backup tool for GNU/Linux. Suitable for desktop and servers.
http://www.backup-manager.org/
GNU General Public License v2.0
279 stars 90 forks source link

Hashes file grows forever #124

Open michaelwegemer opened 5 years ago

michaelwegemer commented 5 years ago

I use incremental backup on Linux. The backup files delete on schedule but the hashes file grows forever. It had entries dating back to 2017. I manually edited and removed entries to February of 2018. The hashes file should have entries removed for files that are deleted.

e-belair commented 4 years ago

+1 should be great that the file get purge of removed files

sylvainfaivre commented 2 years ago

This can be done with a small patch on /usr/share/backup-manager/files.sh, line 370. Add both lines starting with sed :

    # Then actually remove the files
    for archive in `cat $list`
    do
        info "Removing archive \"\$archive\"."
        sed_value=`basename $archive`
        sed -e "/$sed_value/d" -i "${directory}/`hostname`-hashes.md5"
        rm -f $archive
    done
    rm -f $list