Created
September 2, 2025 22:30
-
-
Save jacobkossman/b4cf30ca119e9e4f39e2fffa013945c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # DO NOT CHANGE THESE | |
| URL_PATH="/api/system/backup/export" | |
| USERNAME="web-configurator" | |
| FILE_PREFIX="UCR3_" | |
| FILE_TIMESTAMP=$(date +%Y-%m-%d_%H%M%S) | |
| FILE_EXTENSION="backup" | |
| # EDIT THESE TO MATCH YOUR CONFIG | |
| IP_ADDRESS="XX.XX.XX.XX" | |
| PINCODE="XXXX" | |
| FILEPATH="/path/to/backups/" # be sure to include the ending slash! | |
| FULL_FILEPATH="${FILEPATH}${FILE_PREFIX}${FILE_TIMESTAMP}.${FILE_EXTENSION}" | |
| curl --silent -u "$USERNAME":"$PINCODE" --location "http://${IP_ADDRESS}${URL_PATH}" --header "Accept: application/octet-stream" -o "$FULL_FILEPATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment