A simple single executable tool to back up your MySQL/MariaDB databases to Azure Blob Storage.
Purpose: no docker requirement, no fancy configuration files, low learning curve
SSH to your server
mkdir -p /var/lonebackup && cd "$_"
# Get the latest release
wget https://github.com/baltuonis/lonebackup/releases/download/v1.0.2/lonebackup-x64
vim config.json
config.json
{
"AzureStorageConnectionString": "storagestring",
"AzureStorageContainer": "container",
"AzureStorageFolder": "folder",
"ArchivePassword": "abcd",
"MySQL": {
"Host": "localhost",
"Port": 3306,
"User": "root",
"Pwd": "toor",
"Databases": [
"dbname1"
]
},
"CreateLocalFile": false
}
Run manual backup
./lonebackup-x64
Then create a cron entry
crontab -e
5 1 * * * cd /var/lonebackup && ./lonebackup-x64
Use docker when having dependency problems on remote machines (old servers):
- Copy lonebackup to remote machine
- Prepare config.json
- Copy
Dockerfile-remote
to remoteDockerfile
- Run commands:
docker build -t lonebackup .
docker run --rm --network host lonebackup
- Backup rotation
- App Insights logging
- Upgrade Azure Storage packages
- Create a GitHub action for releases