digint / digint/btrbk

Fix clean command suggestion when using non-default port for remote targets

Open
#559 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
2.1k
Forks
139
PR merge metrics
No merged PRs in 30d

Description

````
$ btrbk --version
btrbk command line client, version 0.32.6
````

````
$ sudo -u btrbk btrbk resume --progress
WARNING: Target subvolume "myhost.dyndns.com[1234]:/mnt/backup-system/myhost/root.20230913T1600" exists, but is not a receive target of "/mnt/btrfs/@snapshots/btrbk/root.20230913T1600"
WARNING: Please delete stray subvolumes: "btrbk clean myhost.dyndns.com[1234]:/mnt/backup-system/myhost"
WARNING: Skipping backup of: /mnt/btrfs/@snapshots/btrbk/root.20230913T1600
Creating backup: myhost.dyndns.com[1234]:/mnt/backup-system/myhost/root.20230914T1450
...
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230924T1500
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230925T1700
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230926T1300
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230926T1400
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230926T1505
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230926T1533
>>> myhost.dyndns.com[1234]:/mnt/backup-data/myhost/data.20230926T1600

NOTE: Some errors occurred, which may result in missing backups!
Please check warning and error messages above.
Please delete stray subvolumes: "btrbk clean myhost.dyndns.com[1234]:/mnt/backup-system/myhost"
Please delete stray subvolumes: "btrbk clean myhost.dyndns.com[1234]:/mnt/backup-data/myhost"
````

The suggested command `btrbk clean myhost.dyndns.com[1234]:/mnt/backup-data/myhost` doesn't work.

````
sudo -u btrbk btrbk clean myhost.dyndns.com\[1234\]:/mnt/backup-system/myhost
ERROR: Filter argument "myhost.dyndns.com[1234]:/mnt/backup-system/myhost" does not match any volume, subvolume, target or group declaration
````

The command has to be `btrbk clean myhost.dyndns.com:1234/mnt/backup-system/icarus`

Maybe it makes sense to change the output of the subvolume names too to the "real" name/location?
````
>>> myhost.dyndns.com:1234/mnt/backup-data/myhost/data.20230926T1300
````

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the btrbk clean command and the warning output generated by resume for remote targets with a non-default port. Reproduce the reported myhost.dyndns.com[1234] case and verify that the suggested clean command is accepted and that displayed remote paths use one consistent location format.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.