How to restore backup of only one user when we are using nextcloud with s3 being the primary storage?

We are using nextcloud with s3 being the primary storage and backing up S3 content to another location, however, the content has no readable name and no folder hierarchy and so I was unable to find out how I could restore the backup of just one user at specific, if it loses all its files and folders or if all its data is encrypted by ransoware.

Knowing that the metadata is located in the nextcloud database, would anyone know how to filter the metadata for a particular user, so that we can create a script that copies and replaces only the files of that specific user in the files in the s3 bucket?

Thank you!

Nextcloud version: 18.0.4
Operating system and version: Ubuntu 18.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25):
PHP version: PHP 7.2.24

please someone?

Like you mentioned previously you need to parse the database and then create a script to download the files from S3.

If you want to also restore the data you’ll want to copy the entire row in the table per file. You’re going to have to pay someone to create the backup script if you don’t know how to do it yourself. I don’t believe anyone has made such a script public.