From 2e7529c6a123fc673eba96635099d6a4d844063d Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 21 Feb 2022 16:25:06 +0100 Subject: [PATCH] How to figure out if you have been affected --- ...r-invalid-or-negative-modification-date.md | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/How-to-fix-the-error-invalid-or-negative-modification-date.md b/How-to-fix-the-error-invalid-or-negative-modification-date.md index 80d7888..b7ac16b 100644 --- a/How-to-fix-the-error-invalid-or-negative-modification-date.md +++ b/How-to-fix-the-error-invalid-or-negative-modification-date.md @@ -1,23 +1,27 @@ -### 🐞 About the error "Could not update metadata due to invalid modified time" +## 🐞 About the error "Could not update metadata due to invalid modified time" -- The error is visible on the desktop client interface and in the logs: **Could not update metadata due to invalid modified time**. -- The bug was introduced in the **Desktop client 3.4.0**. Currently, all known issues are **resolved with version 3.4.2**, except for one issue that only occurs in combination with the community build of Nextcloud, version 23. +The bug was introduced in the **Desktop client 3.4.0**. Currently, all known issues are **resolved with version 3.4.2**, except for one issue that only occurs in combination with the **community build of Nextcloud, version 23**. + +### How to figure out if you have been affected by it +- If your systems have been affected by the invalid metadata issue in **desktop client 3.4.0**, the error might be visible on the desktop client interface and in the logs: **Could not update metadata due to invalid modified time**. +- You can find the affected files in your database using a SQL query:
+`SELECT COUNT(*) FROM oc_filecache WHERE mtime < 86400;` -*** ⚠️ Before you proceed ⚠️ -1. You do not need to put the server in maintenance mode. -2. You do not need to make a backup of your database, however backups are always recommended as a regular practice. -3. Make sure to be running the latest desktop client. See https://github.com/nextcloud/desktop/releases. -4. Please always use the latest version of the scripts. See https://github.com/nextcloud-gmbh/mtime_fixer_tool_kit. + 1. Note that recovering the exact modification time requires restoring backups which may be impractical if the files have been modified already. + 2. You do not need to put the server in maintenance mode. + 3. You do not need to make a backup of your database, however backups are always recommended as a regular practice. + 4. Make sure to be running the latest desktop client. See https://github.com/nextcloud/desktop/releases. + 5. Please always use the latest version of the scripts. See https://github.com/nextcloud-gmbh/mtime_fixer_tool_kit. -*** -### 🔧 How to fix it + +## 🔧 How to fix it We provide the following **scripts** to help with the recovery of the server state. -#### Files stored on the server +### Files stored on the server 1. [Script for server side fixing of invalid dates (`solvable_files.sh`)](https://raw.githubusercontent.com/nextcloud-gmbh/mtime_fixer_tool_kit/master/solvable_files.sh) - Copy the file to the `nextcloud` folder on the server. @@ -30,7 +34,7 @@ We provide the following **scripts** to help with the recovery of the server sta - As a last step it is necessary to scan the files on the storage (unless you used the `scan` argument):
```sudo -u www-data php /occ files:scan --all``` -#### Files stored in Group Folders +### Files stored in Group Folders If you use the **group folders feature**, we provide the following scripts to help with the recovery of the **files located in group folders**: @@ -46,7 +50,7 @@ If you use the **group folders feature**, we provide the following scripts to he - Call it with the following arguments:
`./fix_group_folders.sh ` -#### Files stored in an External Storage +### Files stored in an External Storage For **files located in an external storage like S3**, the fix is only necessary in the database by updating the `mtime` to a valid value:
``` UPDATE oc_filecache SET mtime=1645452423, storage_mtime=1645452423 where mtime < 86400;``` \ No newline at end of file