borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
11.19k stars 742 forks source link

What would it take to make an "overlapping disk usage" analyzer for borg archives? #8027

Closed lahwran closed 1 month ago

lahwran commented 10 months ago

Have you checked borgbackup docs, FAQ, and open GitHub issues?

yes

Is this a BUG / ISSUE report or a QUESTION?

question: feature request / implementation advice request

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

1.1.15 - tried to upgrade but it wasn't compatible so I rolled back. not intending to upgrade unless I really have to.

Operating system (distribution) and version.

ubuntu 20.04.6 LTS

Hardware / network configuration, and filesystems used.

5tb zfs local

How much data is handled by borg?

4.5TB deduped

Describe the problem you're observing.

I'm about to run out of space! I'd like to be able to ask borg which archives are uniquely using space. What do I need to do in borg's internals to identify which archives uniquely use space?

ThomasWaldmann commented 10 months ago

You can use borg info repo::archive and it will show you in the "deduplicated" column how much space is used exclusively by this single archive.

It's practically not as helpful as it may sound though, because if you run another backup on the same source data a day later, likely a lot of these chunks will then be not exclusively used by the first archive any more.

So the best way in practice to recognize sudden backup of unwanted data (like your latest ISO download, for example) is to use borg create --stats ... and check the log output for a sudden space increase.

About borg 1.1 to 1.2: it shouldn't be a problem usually, just follow the notes in the changelog. 1.1.x is already out of support as far as we are concerned here and 1.2.x isn't "fresh" any more.

If you encounter issues with the upgrade not covered by the changelog notes, feel free to open an issue here.

ThomasWaldmann commented 10 months ago

If you have "weird" space usage although you delete stuff: check if your repo is in append-only mode (by repo/config or by authorized_keys ssh forced command). As long as it is in append-only mode, it will not free disk space.

ThomasWaldmann commented 1 month ago

Related: #71

ThomasWaldmann commented 1 month ago

Related: borg2 beta12 now has "borg analyze". Read the docs about what it does precisely.