I have a small nextcloud 11 (had to edit this, originally I posted I was using nextcloud 10 ) server running since two weeks for a small office and every was going ok, but it grew to 16 users and started to work a bit slow (server load was over 100% sometimes). So I tried to configure memcached to boost speed.
I was making changes in config.php and apache configuration (I had nextcloud in a separate subdomain using VirtualHost directive and letsencrypt SSL certs) using this guide to configure cache:
After install and configure APCu and Redis I added the related configuration lines to config.php:
'memcache.local' => '\OC\Memcache\APCu', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'filelocking.enabled' => 'true', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0,
But Nextcloud was not loading (only a blank page) so I commented out those lines and checked the /etc/apache2/sites-available/ configuration. I made some changes to clean up the default-ssl.conf because there were duplicate entries and after that… disaster!!
Next I time I opened the nextcloud web I was facing the default installation page as if it were nextcloud’s first run and [nextcloud_dir]/config/config.php was overwritten with:
<?php $CONFIG = array ( 'instanceid' => 'oc19s0j0n89i', );
All my configuration was lost!!
Is there a way to recreate the instanceid and the other parameters in config.php to restore the nextcloud installation? (the data/ folder and the database are intact)
If no, how can I reuse the existing database and the data/ folder in a new nextcloud installation? Please, help…
Thank you very much.
PD: If config.php was deleted by nextcloud installation script (I think the nextcloud instance though it was a first run installation after I made changes in the apache’s default-ssl.conf), please remove that “feature”
PD2: English is not my first language, please forgive me If my English is not good enough