Nextcloud version : 29.0.3
Operating system and version : Ubuntu 22.04 with Docker
Apache or nginx version: Apache 2.4
PHP version: 8.2.20
The issue you are facing: My database is 110 GB big. The VM is regularly running out of space and I have to resize it.
Some info, maybe it’s useful:
- I’m using external SFTP storage
- The setup is a couple of years old
- The size of the database is constantly growing. I have to enlarge the VM every couple of month by like 20 GB or so
- Some apps i’m using are: Deck, Mail, Notes, Onlyoffice
- I already ran
occ files:cleanup
andocc files:scan --all
, but it made no difference - i already emptied the trash bin
- There’s just one user on my instance
- In the admin overview I often get the warning that some indices are missing. I then run
occ db:add-missing-indices
, but after couple of weeks I get the message again - A couple of times I ran completely out of storage. Maybe that corrupted my database?
Why is the database so big? Can I clean it up or maybe deactivate a feature that produces so much data?
Steps to replicate it:
- Just use it for a long time
The output of your Nextcloud log in Admin > Logging:
nothing
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
array (
0 => '192.168.11.3:8080',
1 => 'cloud.domain.com',
2 => 'app',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '29.0.3',
'overwrite.cli.url' => 'https://cloud.domain.com',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'xxx',
'installed' => true,
'overwriteprotocol' => 'https',
'maintenance' => false,
'app_install_overwrite' =>
array (
0 => 'files_external_gdrive',
1 => 'documentserver_community',
),
'loglevel' => 0,
'app.mail.verify-tls-peer' => false,
'theme' => '',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'password' => 'xxx',
'port' => 6379,
),
'default_phone_region' => 'DE',
'allow_local_remote_servers' => true,
'mail_from_address' => 'no-reply',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'domain.com',
'mail_smtphost' => 'smtp',
'maintenance_window_start' => 1,
);