File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,50 @@ ocis storage-users uploads sessions --expired=true --clean
140140ocis storage-users uploads sessions --processing=true --has-virus=false --resume
141141```
142142
143+
144+ #### Delete Stale Nodes command
145+
146+ This command allows to remove (or revert) nodes that are stale, meaning they are in postprocessing but their upload session is gone.
147+ 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.
148+
149+ ``` bash
150+ ~ /ocis storage-users uploads delete-stale-nodes < commandoptions>
151+ ```
152+ ```
153+ NAME:
154+ ocis storage-users uploads delete-stale-nodes - Delete (or revert) all nodes in processing state that are not referenced by any upload session
155+
156+ USAGE:
157+ ocis storage-users uploads delete-stale-nodes [command options]
158+
159+ OPTIONS:
160+ --spaceid value Space ID to check for processing nodes (omit to check all spaces)
161+ --dry-run Only show what would be deleted without actually deleting (default: true)
162+ --verbose Enable verbose logging (default: false)
163+ --help, -h show help
164+ ```
165+
166+ #### Command Examples
167+
168+ Dry run to see what would be deleted (recommended first step)
169+
170+ ``` bash
171+ ocis storage-users uploads delete-stale-nodes
172+ ```
173+
174+ Set ` --dry-run=false ` to actually delete the stale nodes
175+
176+ ``` bash
177+ ocis storage-users uploads delete-stale-nodes --dry-run=false
178+ ```
179+
180+ Use ` --verbose ` to get more information about what is happening
181+
182+ ``` bash
183+ ocis storage-users uploads delete-stale-nodes --dry-run=false --verbose
184+ ```
185+
186+
143187### Manage Spaces
144188
145189This command set provides commands to manage spaces, including purging disabled spaces that exceed the retention period.
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ func buildInfo(filter storage.UploadSessionFilter) string {
336336func DeleteStaleProcessingNodes (cfg * config.Config ) * cli.Command {
337337 return & cli.Command {
338338 Name : "delete-stale-nodes" ,
339- Usage : "Delete all nodes in processing state that are not referenced by any upload session" ,
339+ Usage : "Delete (or revert) all nodes in processing state that are not referenced by any upload session" ,
340340 Flags : []cli.Flag {
341341 & cli.StringFlag {
342342 Name : "spaceid" ,
You can’t perform that action at this time.
0 commit comments