[pbs-devel] [PATCH proxmox-backup 08/12] api2/admin/datastore: add get/set_protection
Fabian Ebner
f.ebner at proxmox.com
Fri Sep 17 14:02:47 CEST 2021
Am 16.09.21 um 12:16 schrieb Fabian Ebner:
> Am 13.09.21 um 10:34 schrieb Dominik Csapak:
>> On 9/10/21 14:43, Fabian Ebner wrote:
>>> Am 06.09.21 um 12:57 schrieb Dominik Csapak:
>>>> for gettin/setting the protected flag for snapshots (akin to notes)
>>>>
>>>
>>> For notes, there is a 'show' command, but not for protected. Is there
>>> an other way to query the current protection of a single snapshot via
>>> proxmox-backup-client?
>>>
>>> I'm working on bug #3307, which is the same feature for PVE and for
>>> integration with the PBS plugin it would be nicer to query only the
>>> single snapshot. Or should I list the whole group and extract the
>>> info from there instead?
>>>
>>
>> well, i did not think we would need a 'show' command yet for a single
>> snapshot, but if you'll need it, i can either add it later
>> or in a v2 (if the series needs some changes)
>>
>> the api already contains the 'get' method anyway
>>
>
> Using the API instead of the client also makes distinguishing between
> "not supported" (i.e. 404 status code) and some other error easy. To do
> the same with proxmox-backup-client, it would be necessary to match the
> error message, but that would require refactoring run_client_cmd (in
> PBSPlugin.pm) AFAICT.
>
> Anyways, during testing I noticed that the GET call does not fail if the
> requested snapshot doesn't even exist.
>
Another small issue is that setting protected to false for a
non-protected backup will fail, because the API call tries to remove a
non-existent file then.
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
More information about the pbs-devel
mailing list