Thanks Team for these replies. not sure how I missed these commands.
I wasn’t sure which version of PHP I have installed (I installed this nethserver new 3 days ago to test backup and Talk) so I checked to see what version(s) of php I have installed and it seems I have only 7.2:
[root@nethserver share]# rpm -qa php7
The following command did the trick and ran successfully:
[root@nethserver share]# sudo -u apache scl enable rh-php72 – php -dmemory_limit=512M /usr/share/nextcloud/occ files:scan --all
Starting scan for user 1 out of 5 (A165EA09-9DA5-4606-9300-4EDDD4443627)
Starting scan for user 2 out of 5 (admin)
Starting scan for user 3 out of 5 (BCED6330-8C3D-4DE7-97BD-20A435A17271)
Starting scan for user 4 out of 5 (CEE99C82-6D68-4ECB-8E83-2968EA586005)
Starting scan for user 5 out of 5 (D0F46740-8392-4E7E-A9BF-E0BD6FEFE885)
| Folders | Files | Elapsed time |
| 23 | 81 | 00:00:02 |
And now all my restored test files I’ve been restoring through Nethserver GUI are in my Nextcloud once again! Nice job Team!
So I’ve continued my testing now…
I’ve taken the suggestion from @mrmarkuz to modify the
/sbin/e-smith/restore-file script and added to the end of it the code you’ve suggested.
Next I created test files on my Nextcloud and added text to these files. I backed up my Nethserver to S3 using Nethserver backup. I then deleted some test files and began restoring though Nethserver (using overwrite and not-overwrite options). The files are now showing up in my Nextcloud but what’s curious is that the text I had in each file are not there? In fact all restored files are empty.
I think I’ll remove the changes I made to
/sbin/e-smith/restore-file script and issue the manual command for now. It’s not a common task (I hope!) to have to restore files that are deleted/corrupted so issuing the manual command isn’t hard. I’m curios though if Nethserver Team will add a permanent change to the restore process to issue this files:scan command IF the restore includes Nextcloud?
I’ll keep you posted on my testing. Thanks!