As a somewhat related aside, if you're looking for a script that can automate backups (including automatically uploading a copy to a cloud storage provider of your choice) you might want to check this out: https://www.akeebabackup.com/products/akeeba-solo.html

I use their Wordpress and Joomla tools almost every day for my clients and it works beautifully. Set up a cron job and it'll just automatically back everything up (files and database) and create a self-contained file that includes a built-in installer.