nextcloud / nextcloud/user_migration
Add option to tell migrator to delete existing data before import (use app for backup and restore)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 10
- Avg merge
- 6h 5m
- Merged PRs (30d)
- 12
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.
Feature request
Which Nextcloud Version are you currently using:
34.0.0 beta 1
Is your feature request related to a problem? Please describe.
When importing something right now, the import only adds data from the zip file and avoids to delete any existing data. This can lead to duplicate things (e.g., mail accounts) and potentially lead to an invalid state when it comes to conflicting app settings for example. Additionally, this behavior is quite frustrating when it comes to importing a backup with the goal of reverting to a specific state.
Describe the solution you'd like
To avoid this, I would like the option to let the migrator delete existing data before importing. I'm thinking about a dedicated checkbox when using the GUI or a switch when using the CLI saying "Delete existing data before import". That could then call an optional deleteExistingData function in the individual migrations.
Describe alternatives you've considered
I'm aware that this case should be handled by the individual migration developer, yet it's something that may be handy in case something goes wrong and the user/administrator doesn't care about existing data.
Additional context
I'm aware that his may be a bit out of scope for this app, as the main goal is to migrate between different instances and not backup and restore. But I can see this app being used for this purpose as well as it's doing exactly that under the hood.
Please also see this discussion about that topic as well as the linked PR discussion.
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.
Research direction
Start by reading the linked discussion and the linked PR discussion, then trace how the migrator handles imports through both the GUI and CLI. The issue does not name files or tests. Done would require an agreed design for deleting existing data before import, including how an optional deleteExistingData function is handled by individual migrations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, cli, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100