KenKundert / borg-space

Accessory for Emborg used to report and track the size of your Borg repositories
GNU General Public License v3.0
4 stars 1 forks source link

Unable to get working on Alpine #2

Closed adhawkins closed 2 years ago

adhawkins commented 2 years ago

I'm trying to package this up for Alpine, and on initial testing it's not working:

/ # emborg -c pcbackup list
2021-03-31-03-56-49
2021-04-30-14-39-50
2021-05-29-23-31-43
2021-06-30-02-56-15
2021-07-31-04-21-42
2021-08-22-17-11-08
2021-08-29-16-54-33
2021-08-31-23-34-57
2021-09-05-03-19-15
2021-09-12-23-26-38
2021-09-16-03-21-03
2021-09-17-03-18-56
2021-09-21-09-59-20
2021-09-22-03-31-47
2021-09-23-23-21-09
2021-09-24-03-04-32
2021-09-25-03-47-29
/ # borg-space pcbackup
Traceback (most recent call last):
  File "/usr/bin/borg-space", line 161, in <module>
    generate_report(
  File "/usr/bin/borg-space", line 103, in generate_report
    for config in configs:
TypeError: 'NoneType' object is not iterable
/ # emborg -c pcbackup info
              config: pcbackup
               roots: /backups/pcbackup
         destination: hawkinsuser2@scpuk1.cdn.lima-labs.com:nas/pcbackup
  settings directory: /root/.config/emborg
             logfile: /root/.local/share/emborg/pcbackup.log
      last backed up: 2021-09-25T08:58:29.612608+01:00, 5 hours ago

Repository ID: b61faf103d5c2cd9c4da2b7baef556e22107e3bcf954799e6bf15d318dde445b
Location: ssh://#redacted#@#redacted#/./nas/pcbackup
Encrypted: Yes (repokey BLAKE2b)
Cache: /root/.cache/borg/b61faf103d5c2cd9c4da2b7baef556e22107e3bcf954799e6bf15d318dde445b
Security dir: /root/.config/borg/security/b61faf103d5c2cd9c4da2b7baef556e22107e3bcf954799e6bf15d318dde445b
------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
All archives:               17.57 TB             16.93 TB              1.46 TB

                       Unique chunks         Total chunks
Chunk index:                  603889              7141189

Could it be that it can't find the Emborg API? Where does the Emborg API need to be installed to be accessible by borg-space?

KenKundert commented 2 years ago

Thanks for reporting this. This is bug in emborg that was exposed because you do not have a default configuration defined and you did not specify a configuration. I'll fix the issue and update emborg in the next few days.

KenKundert commented 2 years ago

Actually, after a closer look you specified the name of a configuration, and you case fails in a different way that mine did. So my previous response was premature.

I'm looking at the code and I cannot figure out a way that configs can be None. Is it possible that you are running an old version of emborg? borg-space needs emborg version 1.27.

adhawkins commented 2 years ago

Bingo. Apologies, I thought I was running the latest version. Just trying again, but my backup provider is bring DDOSed at the moment so everything is running slow. Will report back once I have more info.

Thanks

adhawkins commented 2 years ago

Ok, all appears well now. Thanks for the assistance.