Open MayeulC opened 2 years ago
Restoration succeeded with:
mkdir /home/yunohost.app/nextcloud/data
# Just creating the above was not enough, as `find /home/yunohost.app/nextcloud/ -type f -print0` returns an empty list
touch /home/yunohost.app/nextcloud/data/moved
yunohost backup restore nextcloud-pre-upgrade1 --apps nextcloud --debug
I proceeded to upgrade, and it worked. I'm going to perform the same on my second Nextcloud instance, but the scripts should probably handle that case better.
Edit: new error on the second instance: https://paste.yunohost.org/raw/oqaxicawug
Adding to the above touch /home/yunohost.app/nextcloud__2/data/nextcloud.log
solves the issue.
I found this thread researching if i can move nextcloud data directory. it seems not advisable at the moment. My question is, if it would work with symlinks as described in solution 2 of this post: https://help.nextcloud.com/t/howto-change-move-data-directory-after-installation/17170 ?
@Aaaamu I have been doing this for years; with the occasional issue such as this one.
I did more or less the same as in the instructions here: https://yunohost.org/en/app_nextcloud#ii-migrate-nextcloud-data
It's probably a good idea to create a dummy file in /home/yunohost.app/nextcloud/data/
as I did above with touch /home/yunohost.app/nextcloud/data/moved
, just in case this issue happens.
This is a bug. I also have this issue but I didn't move the directory: there's just no files in it. the find fails, and the chmod too. You should do something like
while read file; do
done <<< find
Or, better, a recursive chmod command without find !
I ran into this issue as well.
My biggest gripe is that it also prevents backups from being restored, because the restore process will try to create the log file in the hardcoded datadir:
# Make sure a log file exists (mostly for CI tests)
logfile="/home/yunohost.app/$app/data/nextcloud.log"
if [ ! -f "$logfile" ]; then
touch "$logfile"
chown $app: "$logfile"
fi
I had to create the directory /home/yunohost.app/$app/data/
manually before being able to restore the backup.
This workaround is also needed when restoring on a new server, at least for version 24.0.7~ynh1
.
Doing :
mkdir /home/yunohost.app/nextcloud/data
touch /home/yunohost.app/nextcloud/data/moved
made it work !
Describe the bug
Upgrading to the latest version.
I previously moved the nextcloud data off to an external disk, editing
/var/www/nextcloud/config/config.php
and the valuedatadirectory
. Everything was running smoothly until the upgrade.It looks like it happened because I recently cleaned up the
/home/yunohost.app/nextcloud
directory, removing/home/yunohost.app/nextcloud/data
in the process.Context
yunohost app info $app_id
Steps to reproduce
/var/www/nextcloud/config/config.php
file to place your data elsewhere, optionally move the existing data thereExpected behavior
The original data directory should not be critical to the success of the upgrade operation. Ideally, the data directory should be read from the nextcloud configuration file. Even better, that file should be editable from the web admin.
Logs
If applicable and useful, add screenshots to help explain your problem.