What is saved in database, and what is in files?

I’m running ERPNext app (without MariaDB server) on AWS EC2, and having the MariaDB on AWS RDS separately.

I’m thinking of having more app servers (EC2 instances) in multiple regions for performance and latency improvement.
I’m wondering if I have to backup app servers and, more importantly, sync files on multiple app servers.

Is there any documents covering what is saved in files and DB?
If not, I’d appreciate your help here!