Nextcloud Update/Upgrade Query Regarding Duration of Steps and Volume Size

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 29.0.6
Operating system and version (eg, Ubuntu 24.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 8.3): 8.1

The issue you are facing:
Is the update duration directly proportional to the size of the files in Data? I have 2.2TB worth data in the Data folder. Recently, I have been updating manually because the web and command line updates usually get stuck (with no errors) on Step 3 Creating Backup and Step 9 Delete Old Files, if I use the command line update and skipped making a backup, when it used to be rather straightforward, although it may have been before having such large data in Nextcloud.

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. Update Nextcloud using the web updater, it will stay on Stage 3 Creating Backup, I will get impatient, cancel the update and use the command line update instead.
  2. Deal with the Update in Process issue because the update has been cancelled.
  3. Update using the command line using ```
    sudo -u www-data php /path/to/nextcloud/updater/updater.phar --no-backup

I've read about updates taking so long (https://help.nextcloud.com/t/why-do-updates-take-so-long/157603) but they don't mention any errors. Should I just be patient wait for Steps 3 and 9 to finish even if it takes hours?


The output of your Nextcloud log in **Admin > Logging**:

PASTE HERE


The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):
<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '/',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '192.168.0.1',
    2 => '',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '29.0.6.1',
  'overwrite.cli.url' => 'https://192.168.0.1/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'maintenance_window_start' => 1,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'default_phone_region' => 'NZ',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'twofactor_enforced' => 'false',
  'filesystem_check_changes' => 1,
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

Any insights on this? I can always do the manual update but it always takes time after adjusting ownership permissions with:

chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 {} \;
find nextcloud/ -type f -exec chmod 640 {} \;

I have multiple terabytes worth of files in the /data directory and after moving that, it usually takes time to finish the permissions changes.

Yes, if your datadirectory is located underneath your installation folder this is current behavior.

The backup and deletion steps do not do anything to the datadirectory, but the way the exclusion code logic is currently implemented the datadirectory itself is traversed. So the performance is impacted by the folder size and I/O performance.

These matters are being tracked in dedicated Issues for the createBackup step and for the deleteOldFiles step.

I implemented a prototype that addresses these successfully, but haven’t had time to finish it up for review.

Recently, I have been updating manually because the web and command line updates usually get stuck (with no errors) on Step 3 Creating Backup and Step 9 Delete Old Files, if I use the command line update and skipped making a backup, when it used to be rather straightforward, although it may have been before having such large data in Nextcloud.

It’s likely the update is not truly stuck (at least when running Updater in command-line mode), but just taking a long time.

I can always do the manual update but it always takes time after adjusting ownership permissions with:
[chown / chmod / find]

You can probably make this go faster by using a suitably structured find -prune for command (for both chown and chmod) that excludes your data/ folder and avoids traversing it at all (some hints at StackOverflow).

Copy. I was thinking about that, too. So, as long as there is no error prompted, it’s OK to just keep on waiting, right? If this is the case, I will truly select a much more appropriate maintenance schedule.

Thanks. I will look into this if I am going to do the update manually again.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.