Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem
c.f. YunoHost/issues#1102
Currently there are some counter-intuitive behaviors with
backup create
andbackup restore
.Typically,
yunohost backup create --apps wordpress
will backup wordpress and the whole system. You need to explicitly add--ignore-system
at the end. Similarly,yunohost backup create --system ldap
will backup the ldap base and all the apps. This kind of stuff also apply for the restore, soyunohost backup restore --apps wordpress
will restore wordpress and all the system ...This would be nice to have this fix for stretch as we can expect several people to be willing to use the backup/restore instead of the straight migration.
Solution
--hooks
options)--ignore-system
and--ignore-apps
--apps
or--system
are given)To clarify, here's a table summarizing the behavior for a few example :
yunohost backup create
yunohost backup create --apps
yunohost backup create --apps wordpress
yunohost backup create --apps wordpress --system
yunohost backup create --apps wordpress --system ldap
(Same kind of behavior for restore)
PR Status
To be tested
How to test
Pull the branch and maybe add some debug info + a return to see what it would do without actually doing it ...
Validation