We want to use a new SQL user on your database that has read only access to the database tables. How to setup the automatic backup Step 1: Create a new user for the backup to run on
MySQLDump comes stock with these! You will also need to have both zip and crontab installed on your machine. Getting this setup does not really require too much! I am running this on Ubuntu 20.04, with MariaDB, but this should work with any OS running MySQL or MariaDB. (optional) You can expand this to copy the zip file to a NAS using RSYNC.Dumps the entire contents of the database to a text file.This script can be automated with a cron job to make sure that it happens daily! This means you can rebuild your database by just executing the text file in any SQL language. A disk backup or snapshot is not sufficient to backup your database! The Solution:Ī included program called MySQLDump! ( Man Page) MySQLDump allows you export the entire contents of your database into a text file that is standard SQL commands.
This is something I know first hand from experience.