Re: BackupPC_backupDelete deletes entire backup instead of part of a share.

"G.W. Haywood" <[email protected]> Sun, 12 Oct 2025 18:55:13 +0100 (BST)
Newsgroups gmane.comp.sysutils.backup.backuppc.general
Message-ID <[email protected]>
Hi there,

On Sat, 11 Oct 2025, [email protected] wrote:

> ... it would be nice if the function would be allow you to
> alternatively specify just a path without a share name similar to
> how directories are stored in the 'pc' directory or how they are
> mounted when using backuppcfs.  i.e., if your share is named 'root'
> (for '/') then you could just do: BackupPC_backupDelete -h HOSTNAME
> -n 742 -s /root/etc/something ...

Do people have sharenames which contain the '/' character?  See e.g.
https://sourceforge.net/p/backuppc/mailman/message/22630073/.  Even if
they do, this could (I think) still be just about doable.  Not part of
this fix though, it would probably take some time to work through.

> ... If your only share is actually '/' then you could do:
> BackupPC_backupDelete -h HOSTNAME -n 742 /etc/something

If I understand and if 'something' is a directory, seems easy enough:

Count the shares; if there's only one, then take the command

BackupPC_backupDelete -h HOSTNAME -n 742 /etc/something

to mean what would right now be given as

BackupPC_backupDelete -h HOSTNAME -n 742 -s OnlyExistingShare /etc/something

and proceed on that basis; otherwise call it a syntax error.

What's the largest number of shares there are likely to be?  One might
even consider, if a path is given without a sharename, looping through
all existing shares.

> It may also be nice to have the option to confirm before deleting...

Noted.  Then we'd have to make sure BackupPC_dump didn't use it... :)

-- 

73,
Ged.


_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/