Scheduled Backup of a Folder to the Cloud

How to set up scheduled folder backups on a server, save them to the cloud, and automatically delete backups older than 30 days.
How to set up scheduled folder backups on a server, save them to the cloud, and automatically delete backups older than 30 days.