Please refer to the Forum Post for more information!
What this script does:
This script backups everything that is in the folder specified by $backupPath and uses the highest multi-threaded compression rate to compress the backup into a single tar.gz file.
If you are running your server within a screen session this script will connect to that screen session and issue the save-all command which will save the current state of the server. It will then issue the save-off command. This will prevent any corruption while the server is backing up. After the script has finished backing up your server it will issue the command save-on so that your server will continue to save (This is customizable for McMyAdmin Users). It will ill display where the backup was stored, the name of the backup, the time it took to run the backup, and the size of the backup. It will exclude the DynMap folder from the backup, if told to (This significantly decreases the backup time). It will also store your backup to a remote server using the SCP protocol.