Controlling file versions and aging

Nextcloud version (eg, 20.0.5): 22.2.5
Operating system and version (eg, Ubuntu 20.04): DEBIAN11.2
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52 (Debian)
PHP version (eg, 7.4): PHP 8.0.16

The issue you are facing: I have no version of any previous file under /files/details/versions and therefor, i cannot restor any previous version of files.

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

The output of your Nextcloud log in Admin > Logging:

nothing really interesting in logs except the following witch is generated when modifying a text file through NC web interface

:"PHP","method":"POST","url":"/index.php/apps/text/session/sync","message":"Unknown: POST Content-Length of 3966 bytes exceeds the limit of 999 bytes at Unknown#0"
:"no app in context","method":"GET","url":"/index.php/apps/files/?dir=/0_dropbox/Dropbox/0_Public/0_passwd","message":"Deprecated event type for OCA\\Files::loadAdditionalScripts: Symfony\\Component\\EventDispatcher\\GenericEvent is used"

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

<?php
$CONFIG = array (
  'instanceid' => 'PRIVACY',
  'passwordsalt' => 'PRIVACY',
  'secret' => 'PRIVACY',
  'trusted_domains' => 
  array (
    0 => 'PRIVACY',
    1 => 'PRIVACY',
  ),
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => PRIVACY,
    'password' => 'PRIVACY',
    'timeout' => 1.5,
  ),
  'datadirectory' => '/mnt/raid6/nextdata',
  'trashbin_retention_obligation' => 'auto',
  'versions_retention_obligation' => 'disabled',
  'enable_previews' => true,
  'preview_max_x' => 4096,
  'preview_max_y' => 4096,
  'preview_max_filesize_image' => 50,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\HEIC',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\MarkDown',
    9 => 'OC\\Preview\\OpenDocument',
    10 => 'OC\\Preview\\Krita',
  ),
  'default_language' => 'fr',
  'default_phone_region' => 'FR',
  'knowledgebaseenabled' => true,
  'dbtype' => 'mysql',
  'version' => '22.2.5.1',
  'overwrite.cli.url' => 'PRIVACY',
  'dbname' => 'nextDB',
  'dbhost' => 'PRIVACY',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_NextAdmin',
  'dbpassword' => 'PRIVACY',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'PRIVACY',
  'mail_domain' => 'PRIVACY',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'PRIVACY',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'apikey',
  'mail_smtppassword' => 'PRIVACY',
  'cache_chunk_gc_ttl' => 86400,
  'filelocking.ttl' => 3600,
  'auth.bruteforce.protection.enabled' => false,
  'loglevel' => 1,
  'updater.release.channel' => 'stable',
  'maintenance' => false,
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
    1 => 'defaultgroup',
    2 => 'issuetemplate',
    3 => 'flowupload',
    4 => 'twofactor_email',
    5 => 'previewgenerator',
    6 => 'twofactor_webauthn',
  ),
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'theme' => '',
);

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

apache2 access.log doesnt give a clue

/var/log/error.log
[Fri Mar 11 16:27:34.986408 2022] [php:warn] [pid 380665] [client 192.168.1.254:52534] PHP Warning:  Unknown: POST Content-Length of 3970 bytes exceeds the limit of 999 bytes in Unknown on line 0
[Fri Mar 11 16:27:36.884865 2022] [php:warn] [pid 380665] [client 192.168.1.254:52534] PHP Warning:  Unknown: POST Content-Length of 3969 bytes exceeds the limit of 999 bytes in Unknown on line 0

still having no cles on my side.

Anyone ??

Hi @stratege1401

Is the “Versions” app installed and enabled on your instance? If so it should work automatically, and show you previuos versions of a file on the left side in the details sidebar. In order for something to be displayed in the “Versions” tab, obviously changes must actually have been made to the file.

Maybe the documentation is of any help: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/file_versioning.html

@bb77

advise taken and check, but still dead on the water…

  • files_versions: 1.15.0 is installed ( shipped app )
    The app is enable files_versions 1.15.0 enabled ( did a disabled-check_code-enable using occ commands)
    config.php is set back to 'versions_retention_obligation' => 'auto',

  • using web browser to open/modify a .txt file, adding test1… testx for incrementing version
    see the captures : Nextcloud

Done a double update from 22.2.5 to 22.2.6 to 23.0.3

had some issue, but fixed:

After update, disabled and re-enabled the files app using occ.

Now, the problem is fixed.