Here’s another wheel I seem to re-invent over and over. This script is sufficient for backing up a small to medium JES directory install.
You’ll need to set $serverroot. Change $backup_path if you would like to change the destination path for the backups.