I try to execute the following line:
docker exec --user www-data nextcloud_docker php /var/www/html/occ db:convert-filecache-bigint
which returns a prompt:
This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n]
Unfortunately the docker exec command ends (returns to shell) and I am not able to start the occ command.
How can I solve this?
Thanks.
2
Answers
You can try setting the
-i
flag on the docker command and piping a ‘y’ into it, like thisor you can run the command fully interactively with the
-it
flags like thisocc has a
-n
switch.I run it from cron, including the update. I have these lines in /home/update-nextcloud-inside-container.sh inside my container:
#!/bin/bash
date
and the host cron launches a script with these lines:
I see now I am missing taking the instance off-line for running
convert-filecache
. I’ll have to add that.Edit: (
lsdocker.sh
is a script that uses docker ps to list just the active container names)