-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
fix: corrected diskspace calculation in case of docker usage #864
Conversation
'nc-backup' is the name of the program
The info text says, that a snapshot will be "taken". That is wrong! We are in restore-mode --> a snapshot will be "restored"
good catch |
related to conversation here #858 (comment) |
This should not be tied to Also we should add some more space for the database dump, as per the conversation above. Thanks! |
So for clarification of the directory structre (because I am only using the dockerized version). The directory structure looks as follows for both (docker, non-docker) cases:
Am I right? Then the proposal is to remove the outer most if [[ "$includedata" == "yes" ]]
then
size=$((nsize + 100*1024))
else #datadir is inside $basedir/nextcloud therefor substract
size=$((nsize - dsize + 100*1024))
fi Any suggestions on how to estiamte the size of the database dump? Or would you like to make a (larger) hardcoded estimate as it is now? |
hi Yes, the dirs are Your proposed solution looks good to me. About the db dump... it's hard to tell. My dbdir is 1GiB and my dbdump is 300MiB, so I think that the easiest is to go from 100 to 500MiB extra |
- adapted margin (500MB) for additional required space
Here we are. |
Looks good! Now we only need to tweak the calculations like in this commit c18273a, which was fixed after you started working on this. |
This is done! Hope it is correct in this version now. |
looks perfect now :) |
great :) |
thanks! |
I still have the above issue @nachoparker & @paschaef . Nextcloudpi version: Trying to upgrade nextcloud from Fails with the same error as mentioned in #858: |
As mentioned in #844 during backup in the ncp-update process there is the possiblity that no diskspace is available for the backup. Also it was mentioned that the backup is dataless and does not require a lot of space.
However, running in a docker configuration the data-directory is a subdirectory of the
basedir
and hence size ofdatadir
gets counted too eventhoughincludedata
is disabled.This pull request aimed to correct the calculation for the free/occupied diskspace in docker configuration. If not in docker configuration calculation is done as before.