docs(storage-users): document the delete-stale-nodes command

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer committed 2026-09-24 15:33:29 +02:00
1 parent 684781b0bc
commit d8f2f4db63
2 files changed
+46 -2

No files matched your search

+45 -1
View File
@@ -55,7 +55,8 @@ opencloud storage-users uploads <command>
```plaintext
COMMANDS:
sessions Print a list of upload sessions
delete-stale-nodes Delete (or revert) all nodes in processing state that are not referenced by any upload session
sessions Print a list of upload sessions
```
#### Sessions command
@@ -140,6 +141,49 @@ opencloud storage-users uploads sessions --expired=true --clean
opencloud storage-users uploads sessions --processing=false --has-virus=false --resume
```
#### Delete Stale Nodes command
This command allows to remove (or revert) nodes that are stale, meaning they are in postprocessing but their upload session is gone.
It will check all nodes that are in postprocessing and find those without an upload session. Then it will delete the node if there are no other versions. If there are other versions, it will instead revert the node to the previous version.
```bash
opencloud storage-users uploads delete-stale-nodes <commandoptions>
```
```plaintext
Delete (or revert) all nodes in processing state that are not referenced by any upload session
Usage:
opencloud storage-users uploads delete-stale-nodes [flags]
Flags:
--dry-run Only show what would be deleted without actually deleting (default true)
-h, --help help for delete-stale-nodes
--spaceid string Space ID to check for processing nodes (omit to check all spaces)
--verbose Enable verbose logging
```
#### Command Examples
Dry run to see what would be deleted (recommended first step)
```bash
opencloud storage-users uploads delete-stale-nodes
```
Set `--dry-run=false` to actually delete the stale nodes
```bash
opencloud storage-users uploads delete-stale-nodes --dry-run=false
```
Use `--verbose` to get more information about what is happening
```bash
opencloud storage-users uploads delete-stale-nodes --dry-run=false --verbose
```
### Manage Trash-Bin Items
This command set provides commands to get an overview of trash-bin items, restore items and purge old items of `personal` spaces and `project` spaces (spaces that have been created manually). `trash-bin` commands require a `spaceID` as parameter.
@@ -333,7 +333,7 @@ func buildInfo(filter storage.UploadSessionFilter) string {
func DeleteStaleProcessingNodes(cfg *config.Config) *cobra.Command {
deleteStaleNodesCmd := &cobra.Command{
Use: "delete-stale-nodes",
Short: "Delete all nodes in processing state that are not referenced by any upload session",
Short: "Delete (or revert) all nodes in processing state that are not referenced by any upload session",
PreRunE: func(cmd *cobra.Command, args []string) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg))
},