Did not catch this use case. If your user delete 1, or X files, you do not need to restore whole X GB of files, just find this in backup and copy it into user folder and run command to rescan it:
sudo -u www-data php occ files:scan
rescans whole DATA Folder (will take a while)
sudo -u www-data php occ files:scan --path user_id/files/path/to/file
rescans only restored folder in the folder.
Or, you could use filesystem snapshots (from btrfs, zfs, etc) to restore snapshot, but not in disaster when you HDD dies. There is even App to manage it Snapshots - Apps - App Store - Nextcloud
With a Versions app - yes. This App is part of official delivery.
You can even setup it to save all versions for at least X days: https://docs.nextcloud.com/server/15/admin_manual/configuration_server/config_sample_php_parameters.html#file-versions
Backup of NC should have 2 parts: Backup of DB (you did it with mysqldump
command) and backup of data folder. Optionally config or whole NC folder with Apps.
If you are going to “cheap” solution without Raid - just do periodically rsync to your external HDD. This will keeps your data safe. Otherwise have a look into RAID.
It is possible with rsync also, or user restic Rsync to cloud storage for backups? - #2 by Reiner_Nippes But without GUI