Backup/Restore script extract from nextcloud_update.sh (NextCloud VM)

While watching the last NextCloud update run by the script “nextcloud_update.sh” (from the NextCloud VM), I noticed that it was actually performing a backup and then a restore.

Is that code available as a separate backup/restore script?

Within vm/nextcloud_update.sh at master · nextcloud/vm · GitHub, the backup sequence starts around line 555.

Is there a backup and restore only script available that does the same as in the nextcloud_update.sh script?

Thanks
Dan