nextcloud / nextcloud/user_migration
Respect quota on export
Open
@Pytal is already working on this.
Since Jun 29, 2022.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 10
- Avg merge
- 6h 5m
- Merged PRs (30d)
- 12
Description
Exporting with contents that exceed the user quota proceeds without error currently
- test what happens when exporting and there is not enough space
- is the file truncated ? is there an error ?
- if not, might need to use the quota wrapper
- I expect that it works because of https://github.com/nextcloud/server/blob/master/lib/private/Files/Storage/Wrapper/Quota.php#L171
- need to detect that error case and report the error in a clean way
The following steps may be taken to solve this:
- Use
TempExportDestinationas export destination inUserExportJob - When zip is fully exported
- Create a new file in user folder with
$userFolder->newFile()with the zip stream as content and check if quota is handled automatically - If quota is not handled automatically with
$userFolder->newFile()then only create an export in the user folder if zip size + used space does not exceed the user quota
- Create a new file in user folder with
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.