Example, use rsync via UDM-PRO and a linux server (the latter as the backup location).
https://ryanburnette.com/blog/unifi-backup-udmp/
https://www.reddit.com/r/Ubiquiti/comments/kx6sig/sshfs_or_rsync_on_udmpro/
Example simple script in scripts directory, filename: backup-to-server.sh