If I loose/delete all files in Duplicati backup folder that were created and modified after, for example, 21st October. Can I still restore files from the backups taken 21st October and before?
Not necessarily. Sometimes Duplicati will repackage backup archives in order to save space on the back end. If compaction has occurred, some unique data blocks may have been brought forward. If you delete those files then it can render some files even in very old backups unrestorable.
Is this a hypothetical what-if question? Or have you experienced such an incident?
There are ways to see what files are unrestorable when some data on the back end gets lost.
I think about the system when all files in backup are made locked/unchangeable/writeonce after some period so that intruder could not delete them.
Would such a system be tolerant to deletion of the files which were not yet locked if i made backups with
keys as it was proposed for LTO archives?
If the database still exists, it will probably complain about missing files, but that’s not a huge problem. Assuming the local system (and its database) got destroyed, you’d be doing a direct restore anyway. Make sure you have an export of your job configuration stored somewhere else that you can rely on.
Defense against trojans is basically the same idea and might be simpler than on tape or cold storage (which you can search forum for, e.g. Glacier), because I assume the remote files would be readable.
You might want to make maintenance windows possible, e.g. to clean up old versions before backup and database get too gigantic. There can also be times when problems may require changing remote.