nextcloud / nextcloud/server

Allow trashbin (and versions) to be restored on a per user basis from command line (`occ`)

Open
#30,074 6 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: occ feature: trashbin feature: versions
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
often there are sync issues when desktop client removes or changes lot of files by mistake e.g.

desktop client #4016
desktop client #4035
desktop client #3444

As the sync is pretty fast and the error might be not obvious, this results in hundreds or thousands of deleted files or files existing as different versions.

Describe the solution you'd like
Please add a possibility to manage this files from command line e.g. occ or other tool which allows user to perform mass recovery of files (and remove invalid file versions) after such issue.

Good starting point would be the server activity history where the user could review changed files and "undo" the action like restore previous version and delete new one or restore deleted files..

Describe alternatives you've considered
If the problem affects multiple files in different folders the only alternative seems to be a server restore. as manual versions handling is impossible for more than couple of files..

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the occ command surface and the server activity history referenced in the issue, then trace how trashbin and file versions are currently handled. Done would require a defined per-user command workflow for reviewing changes and performing mass recovery or version cleanup, with its scope and verification criteria agreed first.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.