Backup your database
Backup and encrypt your database.
I like it when the database is backed up.
I like it more when it's encrypted and stored off-site.
I love it when I get a slack notification when the backup fails.
The Backup gem does that, and integrates with PagerDuty, Datadog and Slack. It's better at it than any bash file you'll cook-up over a weekend.
I've used the Backup gem for years. And here's a small Ansible project that sets up Ruby, the Backup gem (with a basic backup configuration), and schedules a nightly backup for you.