Howto restore permanently deleted files from rsync backup

i have simple rsync backup for data directory files ( BackupPC: Open Source Backup to disk ) to external server . i can restore files back to users directory, but they doesn’t show up because NC database is not updated.

So question is, how are you doing backup/restore for user data files ?

For e.g. user delete some folder + also removes it from “Deleted Files” permanently. Can i restore files and run some occ command to scan that folder information to the database ?

Check this out Occ path for rescan lokal external share - #2 by gas85

Or use key --all if you restore whole data directory.

Documentation is under

Thank you gas85 for link, files now show up in user GUI.

So basically after file restore i just run:

root@files:/var/www/nextcloud# sudo -u www-data php /var/www/nextcloud/occ files:scan --path=""

1 Like