I use a Python script running on the server and mimic the POST
request that the web frontend uses to trigger the snapshot creation.
First, get a long-lived access token.
Usually they are used for add-ons, but they come in handy here. You can get one in your user profile in the web frontend, scroll down and click "Create token".
Then use the following script:
import datetime
import requests
TOKEN = 'your-long-lived-access-token'
date_string = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')
url = 'http://hassio.local:8123/api/hassio/snapshots/new/full'
headers = {'authorization': ('Bearer ' + TOKEN)}
response = requests.post(url,
headers=headers,
json={"name": date_string},
timeout=600) # should be enough, check duration
# check the status code to make sure the backup worked
print(response.status_code)
print(response.text)
print(response.json())
Now you just have to find out where the snapsnot was created in your installation (e.g. /usr/share/hassio/backup
and copy it into the clouds or an external drive.