Bug 2383188

Summary: No such file or directory - but no errors
Product: [Fedora] Fedora EPEL Reporter: lejeczek <peljasz>
Component: backupninjaAssignee: Denis Fateyev <denis>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel9CC: denis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lejeczek 2025-07-24 04:35:57 UTC
Description of problem:

Hi guys.
I have a bit peculiar results:

-> $ backupninja --now --run /etc/backup.d/mysql-to-borg.borg
...
Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_mysql-to-borg.borg
Debug: export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
Debug: export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
Debug: export BORG_PASSPHRASE="<redacted>"
Debug: unset BORG_CACHE_DIR
Debug: executing borg init
Debug: borg init --encryption=none /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql.borg
Debug: A repository already exists at /X0-STORAGEs/0/X-BACKUPs/whale.mine.priv/mysql.borg.
Info: Repository was already initialized
Debug: executing borg create
Debug: nice -n 0 borg create --stats --compression lz4  --exclude '/root/BACKUPs' /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql.borg::{now:%Y-%m-%dT%H:%M:%S}  '/X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql'
Warning: /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql: stat: [Errno 2] No such file or directory: '/X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql' ------------------------------------------------------------------------------ Repository: /X0-STORAGEs/0/X-BACKUPs/whale.mine.priv/mysql.borg Archive name: 2025-07-24T05:50:43 Archive fingerprint: 1f05cd0cd1fb65ccb783a0409cb2ee7bb3076470ff4c88ffd4da47b03a7e5ee2 Time (start): Thu, 2025-07-24 05:50:43 Time (end): Thu, 2025-07-24 05:50:43 Duration: 0.00 seconds Number of files: 0 Utilization of max. archive size: 0% ------------------------------------------------------------------------------ Original size Compressed size Deduplicated size This archive: 611 B 543 B 543 B All archives: 0 B 0 B 47.02 kB Unique chunks Total chunks Chunk index: 85 85 ------------------------------------------------------------------------------
Warning: Backing up source finished with warnings.
Debug: executing borg prune
Debug: borg prune  --keep-within=300d /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql.borg
Info: Removing old backups succeeded.
Debug: unset BORG_PASSPHRASE
Debug: unset BORG_RSH
Debug: handler returned exit code 0
Warning: <<<< finished action /etc/backup.d/mysql-to-borg.borg: WARNING
Error: /var/lib/prometheus/node-exporter does not exist!
Debug: send report to root
Info: FINISHED: 1 actions run. 0 fatal. 0 error. 2 warning.

In summary:
[Errno 2] but Info: FINISHED: 1 actions run. 0 fatal. 0 error. 2 warning.
Should this not fatal out?
Also weir - perhaps not ninja but borg - behaviour is that VAR in borgs target's is resolved but not source's.

[source]
include = /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql
keep = 300d

[dest]
directory = /X0-STORAGEs/0/X-BACKUPs/${HOSTNAME}/mysql.borg
host = localhost


Version-Release number of selected component (if applicable):

1.2.2-1.el9

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Denis Fateyev 2025-07-29 21:25:47 UTC
This is definitely borg integration related.
Unfortunately I don't use the borg handler, so I cannot provide a useful update right now.

There are 7 commits to borg handler since the latest release [1]
And a couple of still open borg handler bugs in issues [2]
Could you check if updated `borg.in` addresses your issue? 

[1] https://0xacab.org/liberate/backupninja/-/commits/90e486659e68d9cfe4884f469a655a8a567fc531/handlers/borg.in

[2] https://0xacab.org/liberate/backupninja/-/issues