Recovering from hardware failure

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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, 12.0.2): 13.0.1
Operating system and version (eg, Ubuntu 17.04): Gentoo
Apache or nginx version (eg, Apache 2.4.25): Lighttpd-1.4.45
PHP version (eg, 7.1): 7.1.16

The issue you are facing:

I had a hardware issue in that the drive that hosted my Nextcloud database was suffering multiple read-write errors. I’ve replaced it and everything is mostly working as expected, but I have a few files that have this error:

The item is not synced because of previous errors: Error transferring /path/to/affected/file - server replied: Forbidden (Sabre\DAV\Exception\Forbidden)

As far as I can tell from testing, files newly placed into a synced folder are OK, these errors are for just a few files that were there at the time that the drive failure occurred. I’ve tried deleting and re-uploading some of the affected files, but this doesn’t work either.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxx',
  'datadirectory' => '/mnt/vault/nextcloud/data',
  'overwrite.cli.url' => 'https://xxxx/nextcloud',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'NextcloudDB',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'Nextcloud',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'loglevel' => 2,
  'maintenance' => false,

The output of your Apache/nginx/system log in /var/log/____:

2018-05-14 03:10:01: (server.c.1534) logfiles cycled UID = 0 PID = 9935 
2018-05-14 17:46:28: (server.c.1828) server stopped by UID = 0 PID = 19335 
2018-05-14 17:47:29: (log.c.217) server started 


You could try the occ tool from Nextcloud:

sudo -u www-data php /path/to/nextcloud/occ files:scan all

I hope it was a blank between scan and all, can’t check right now.