Local files created while NextCloud was down are deleted upon resync

  • Server version: Nextcloud Hub 6 (Updated to since)

  • Operating system and version: Debian 12 (Bookworm)

  • Apache or nginx version: Apache/2.4.57

  • PHP version: 8.2.7

  • Desktop version: Nextcloud Desktop Client 3.0.1 (updated to 3.1.3 since)

  • OS: Windows 10

I’ve had an unrelated issue with the server hosting my Nextcloud instance that caused it to be unreachable for a few days. During this time, I created new files in my local folder that’s usually synchronized with Nextcloud.

When I finally restored access to my Nextcloud instance, these files were immediately deleted. I was able to recreate them but this is concerning. I expected the Nextcloud Desktop Client to keep track of new files even without connection to the Nextcloud instance and upload them the first chance they get.

The change log in the Desktop Client shows both files being created, and then deleted once the connection to the Nextcloud instance was restored.

Is this the first time you’ve seen this error? Yes, and hopefully the last.

Steps to replicate it:

  1. Set up synchronization between local folder and remote Nextcloud instance.
  2. Cut access to Nextcloud instance.
  3. Create file in the local folder.
  4. Restore access to Nextcloud instance.

config.php file:

$CONFIG = array (
  'instanceid' => 'ocfggw1apvnb',
  'passwordsalt' => 'CITrEJZ70wEZJwyPqbvtyEXee+ASR0',
  'secret' => 'G1zuAFY0wIZj+dKOvvAAS57IckHEaWjF/M2EkA+cEoRIMDS+',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.example.com',
  'datadirectory' => '/home/nextcloud/data',
  'overwrite.cli.url' => 'https://nextcloud.example.com',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => SECRET,
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'loglevel' => 2,
  'theme' => '',
  'mail_smtpmode' => 'sendmail',
  'mail_from_address' => 'user',
  'mail_domain' => 'example.com',
  'mysql.utf8mb4' => true,
  'updater.release.channel' => 'stable',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'US',
  'updater.secret' => SECRET,