-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[enh] Tranfer backup_core_only to BACKUP_CORE_ONLY #398
Conversation
data/helpers.d/utils
Outdated
@@ -77,7 +77,7 @@ ynh_backup_before_upgrade () { | |||
fi | |||
|
|||
# Create backup | |||
sudo yunohost backup create --ignore-system --apps $app --name $app_bck-pre-upgrade$backup_number | |||
sudo BACKUP_CORE_ONLY=1 yunohost backup create --ignore-system --apps $app --name $app_bck-pre-upgrade$backup_number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this ? I'm not sure that the value of BACKUP_CORE_ONLY is propataged to the actual backup script... 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember I already try that. But without all the new commits.
Let's try that right now ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried with nextcloud (and some upgrade of my helpers and of nextcloud scripts to follow this PR). It works as expected.
In fact, it works because the variable is set in the same line than the yunohost command. So, the shell launch by YunoHost keep the value of the variable.
The only problem here that to use the argument IS_BIG, you need to use a second argument, so the third one can be IS_BIG.
IS_BIG should not be associated to $3 as a positional parameter, but be an option, like --is-big.
Yolomerging as it's a small PR and opened since like 4 months |
Problem
backup_core_only
when it's in settings.yml, especially with restore script.Solution
backup_core_only
in settings.yml anymore. But use an environment variable, passed only to the backup script when this helper is used.